# Custom recipe with Text\_input block

**URL:** <https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405>\
**Category:** Uncategorized\
**Tags:** usage, ner, custom, solved\
**Created:** [March 3, 2022, 7:27am UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405 "2022-03-03T07:27:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![celkhaissi](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@celkhaissi](https://support.prodi.gy/u/celkhaissi)\
**Post date:** [March 3, 2022, 7:27am UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405/1 "2022-03-03T07:27:12Z")

</div>

Hi there,

I am trying to create a simple 2-block interface including plain text for NER annotation and a comment box for translation. I've tailored the relevant documentation to suit my project:

```python
import prodigy

@prodigy.recipe("custom_recipe")

def custom_recipe(ner_test_data,lang="en"):

        blocks = [
                {"view_id": "ner_manual"},
                {"view_id": "text_input","field_rows": 3, "field_label": "Explain your decision"},
        ]

        return { 
            "dataset": ner_test_data,
            "view_id":"blocks",
            "config": {
                "blocks": blocks
            }
        }

```

The code runs successfully , however the web interface does not render a text\_input box so I am clearly missing something!

 ![Screen Shot 2022-03-03 at 6.26.11 pm](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/1/197bfca6006f2298963ba991a4698b2d8c341b94.png)

i am running the following command:

> $ prodigy ner.manual ner\_test\_data blank:en ~/Desktop/Test/test.jsonl --label ABSOLUTE,EMPHATIC,NSTRUCT -F ~/Desktop/Test/custom\_recipe.py

---

<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:** [March 4, 2022, 11:26am UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405/2 "2022-03-04T11:26:47Z")

</div>

> [@celkhaissi](#):
>
> $ prodigy ner.manual ner\_test\_data blank:en ~/Desktop/Test/test.jsonl --label ABSOLUTE,EMPHATIC,NSTRUCT -F ~/Desktop/Test/custom\_recipe.py

Hi! The problem here is that you're running the built-in `ner.manual` command, not your custom recipe, which is called `custom_recipe`. So to run that recipe from the file, you want to start with `prodigy custom_recipe`.

Your custom recipe should also include the required arguments that you want to pass in – at the moment, it's only taking a name of a dataset and a positional argument `lang`, and it's not actually returning a `"stream"` of examples to annotate. Instead, you probably want to model your recipe after the existing `ner.manual` and include all the required CLI options, as well as tokenization within the recipe, loading the stream etc:

> <https://github.com/explosion/prodigy-recipes/blob/master/ner/ner_manual.py>

---

<div class="post-metadata">

**Author:** ![celkhaissi](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@celkhaissi](https://support.prodi.gy/u/celkhaissi)\
**Post date:** [March 5, 2022, 2:36am UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405/3 "2022-03-05T02:36:48Z")

</div>

Ah, it just clicked! Got it working now, thanks Ines 🙂 I assume there's currently no way to customise the font size of this text\_input/comment box? It just seems to default to the same size as in the main text (which I've configured via custom\_theme in prodigy.json).

---

<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:** [March 6, 2022, 2:44pm UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405/4 "2022-03-06T14:44:11Z")

</div>

> [@celkhaissi](#):
>
> I assume there's currently no way to customise the font size of this text\_input/comment box? It just seems to default to the same size as in the main text (which I've configured via custom\_theme in prodigy.json).

That's the default, yes! If you want to, you can always provide custom CSS overrides for pretty much anything in the UI via the `"global_css"` config setting in your `prodigy.json`. So you could do something like this:

```json
"global_css": "input[type='text'], textarea { font-size: 20px; }"

```

---

<div class="post-metadata">

**Author:** ![celkhaissi](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@celkhaissi](https://support.prodi.gy/u/celkhaissi)\
**Post date:** [March 7, 2022, 10:36am UTC](https://support.prodi.gy/t/custom-recipe-with-text-input-block/5405/5 "2022-03-07T10:36:05Z")

</div>

Perfect, thanks Ines!
