# activating html\_template

**URL:** <https://support.prodi.gy/t/activating-html-template/606>\
**Category:** Uncategorized\
**Tags:** usage, front-end, solved\
**Created:** [June 12, 2018, 2:45am UTC](https://support.prodi.gy/t/activating-html-template/606 "2018-06-12T02:45:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brandonmp](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@brandonmp](https://support.prodi.gy/u/brandonmp)\
**Post date:** [June 12, 2018, 2:45am UTC](https://support.prodi.gy/t/activating-html-template/606/1 "2018-06-12T02:45:56Z")

</div>

Super new with Prodigy, but trying to setup html templates.

My `prodigy.json` is pretty straightforward:

```python
{
    "theme": "basic",
    "port": 8080,
    "cors": true,
    "host": "0.0.0.0",
    "batch_size": 10,
    "html_template": "<strong>Template! {{text}}</strong>"
}

```

Then, starting prodigy:  
`prodigy ner.teach my_dataset en_core_web_sm dataset.jsonl`

However I’m then greeted with the default UI.

Changing other settings in the `prodigy.json` has the intended effect (eg, `theme`), so I’m certain the config’s being read.

Is there another option I"m missing?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 12, 2018, 8:09am UTC](https://support.prodi.gy/t/activating-html-template/606/2 "2018-06-12T08:09:09Z")

</div>

Hi! The problem here is that the `html_template` currently only works with the `html` interface. Otherwise, it’d also be very difficult for Prodigy to know how to interpret your template – especially since some of the other annotation interfaces (like the manual NER one) are pretty complex.

So you can either write your own [custom recipe](https://prodi.gy/docs/workflow-custom-recipes), or simply use the `mark` recipe, which streams in your data and renders it using an interface of your choice. The following command should show your template as expected:

```bash
prodigy mark my_dataset my_data.jsonl --view-id html

```

---

<div class="post-metadata">

**Author:** ![brandonmp](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@brandonmp](https://support.prodi.gy/u/brandonmp)\
**Post date:** [June 12, 2018, 8:02pm UTC](https://support.prodi.gy/t/activating-html-template/606/3 "2018-06-12T20:02:34Z")

</div>

Ah I think I understand. Does this mean it’s not possible to utilize the highlighting annotation UI with custom templates?

ETA: my objective is to modify the named entity interface to display additional information alongside the piece of text to be annotated. is this possible via `html_template` config?

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [June 12, 2018, 8:32pm UTC](https://support.prodi.gy/t/activating-html-template/606/4 "2018-06-12T20:32:37Z")

</div>

In general, the built-in interfaces are designed to focus on the main annotation decision, which is why the space for additional content is kept to a minimum. But if the information to display is short and/or a link, you can use the annotation task's `"meta"` property. Meta entries will be displayed in the bottom right corner of the annotation card, and URLs will be linked automatically. For example:

```json
{
    "text": "Some text",
    "meta": {
        "note": "This is a note",
        "url": "https://example.com"
    }
}

```

> [@brandonmp](#):
>
> Does this mean it’s not possible to utilize the highlighting annotation UI with custom templates?

Do you mean the manual NER interface that lets you highlight spans by clicking and dragging? In Prodigy `v1.5.0`, this interface got a special setting for rendering additional text that's not part of the highlightable annotation task. It's mostly intended for formatting characters (bullet points, line breaks) that only help the annotator visually – but depending on what you want to do, you could repurpose that feature.

The manual NER recipe pre-tokenizes the text to allow token-based selection that "snaps" to the word boundaries. You can now mark individual tokens as `"disabled": true` and they'll be displayed in grey and won't be selectable:

```json
{
    "text": "Hello Apple",
    "tokens": [
        {"text": "Hello", "start": 0, "end": 5, "id": 0, "disabled": true},
        {"text": "Apple", "start": 6, "end": 11, "id": 1}
    ],
    "spans": [
        {"start": 6, "end": 11, "label": "ORG", "token_start": 1, "token_end": 1}
    ]
}

```

---

<div class="post-metadata">

**Author:** ![brandonmp](https://avatars.discourse-cdn.com/v4/letter/b/b38774/32.png) [@brandonmp](https://support.prodi.gy/u/brandonmp)\
**Post date:** [June 12, 2018, 11:43pm UTC](https://support.prodi.gy/t/activating-html-template/606/5 "2018-06-12T23:43:43Z")

</div>

thanks @ines, super responsive & helpful.

The extra text I’m looking to render is probably too substantial for the manual NER customization it sounds, so I’ll have to devise sthng else.

For reference the use case here is showing contextual information alongside the the relevant annotation task data.
