I'm trying to render the content of the jsonl as HTML for the textcat.manual with this simple recipe
import prodigy
from prodigy.components.loaders import JSONL
from prodigy.components.filters import filter_duplicates
@prodigy.recipe("customrecipe")
def apiresponses(dataset, source):
def get_stream():
stream = JSONL(source)
stream = add_options(stream) # add options to each task
return {
'view_id': 'html',
"dataset": dataset, # save annotations in this dataset
"view_id": "choice", # use the choice interface
"stream": stream,
}
def add_options(stream):
options = [
{"id": 0, "text": "Valid"},
{"id": 1, "text": "Invalid"}
]
for task in stream:
task["options"] = options
yield task
Then I call the recipe as prodigy customrecipe custom_test ./results.jsonl -F customrecipe.py
When I use this the server do not starts, and Im not sure the content will be rendered as html