NER example Gradio Interface method with output for highlighttext is not working in local system with gradio-client 0.3.0 it gives below error ,
Blockquote
gradio with ner events fails with this error, highlighted_text.py", line 162, in postprocess (text[entity[“start”] : entity[“end”]], entity[“entity”]) keyerror: ‘entity’
Solution:
Modify below file in sitepackages
/site-packages/gradio/components/highlighted_text.py
In linenumber 162 change below line
list_format.append(
(text[entity["start"] : entity["end"]], entity["entity"])
)
to
list_format.append(
(text[entity["start"] : entity["end"]], entity["entity_group"])
)
if you are using a jupyter notebook locally restart the kernel to reload the lib files.