# How to create a custom recipe with multiple choice interfaces?

**URL:** https://support.prodi.gy/t/how-to-create-a-custom-recipe-with-multiple-choice-interfaces/7339
**Category:** Uncategorized
**Tags:** custom
**Created:** [August 21, 2024, 11:34pm UTC](https://support.prodi.gy/t/how-to-create-a-custom-recipe-with-multiple-choice-interfaces/7339 "2024-08-21T23:34:10Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![magdaaniol](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/magdaaniol/32/2787_2.png) [@magdaaniol](https://support.prodi.gy/u/magdaaniol)
#### Post date: [August 24, 2024, 3:33pm UTC](https://support.prodi.gy/t/how-to-create-a-custom-recipe-with-multiple-choice-interfaces/7339/2 "2024-08-24T15:33:22Z")

</div>

Hi @ale ,

If your options and HTML titles are static then using multiple `options` blocks each with each own set of options specified in the `view_id` definition.

In this example I used `ner_manual` as the interface on top of the options:

```python
import prodigy
from prodigy.core import Arg, recipe
from prodigy.components.stream import get_stream
from prodigy.components.preprocess import add_tokens
import spacy
from pathlib import Path

@prodigy.recipe(
    "test-recipe",
    dataset = Arg(help="Dataset to save answers to."),
    file_path=Arg(help="Path to texts")
)
def test_recipe(dataset: str, file_path):
    stream = get_stream(file_path) # load in the JSON file
    nlp = spacy.blank("en")
    stream.apply(add_tokens, stream=stream, nlp=nlp)
    blocks = [
        {"view_id": "ner_manual"},
        {"view_id": "html", "html": "<p>This is a fixed html 1</p>"},
        {"view_id": "choice", "options":[{"id": "option_1", "text": "Option 1"}, {"id":"option_2", "text": "Option 2"}],"text": None},
        {"view_id": "html", "html": "<p>This is a fixed html 2</p>"},
        {"view_id": "choice","options":[{"id": "option_3", "text": "Option 3"}, {"id":"option_4", "text": "Option 4"}],"text": None},
        {"view_id": "html", "html": "<p>This is a fixed html 3</p>"},
        {"view_id": "choice", "options":[{"id": "option_4", "text": "Option 4"}, {"id":"option_5", "text": "Option 5"}],"text": None},
    ]

    return {
        "dataset": dataset,
        "view_id": "blocks",
        "stream": stream,
        "config": {
            "labels": ["LABEL"],
            "blocks": blocks,
            "choice_style": "single"
        }
    }

```

This should result in the interface like this one:\<

 ![image](https://us1.discourse-cdn.com/flex020/uploads/prodigy/original/2X/d/dcf16f381e9603b5b45054bd29d81925ce184253.png)

---

_[View the full topic](https://support.prodi.gy/t/how-to-create-a-custom-recipe-with-multiple-choice-interfaces/7339)._
