Spaces:
Runtime error
Runtime error
Commit
·
c23dcf4
1
Parent(s):
2778c79
Update app.py
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ def apply_ner(input_text_message: str):
|
|
95 |
entities = postprocess(classifications)
|
96 |
doc = set_entities(input_text_message, entities)
|
97 |
displacy_html = displacy.render(doc, style="ent", options=options)
|
98 |
-
return displacy_html
|
99 |
|
100 |
|
101 |
examples = ['Things are complicated because we still live together but we have separate lives',
|
@@ -107,6 +107,6 @@ examples = ['Things are complicated because we still live together but we have s
|
|
107 |
|
108 |
iface = gr.Interface(fn=apply_ner, inputs=gr.inputs.Textbox(lines=5, placeholder="Enter your text here",
|
109 |
label='Check your text for compliance with the NVC rules'),
|
110 |
-
outputs="html", examples=examples)
|
111 |
iface.launch()
|
112 |
|
|
|
95 |
entities = postprocess(classifications)
|
96 |
doc = set_entities(input_text_message, entities)
|
97 |
displacy_html = displacy.render(doc, style="ent", options=options)
|
98 |
+
return displacy_html, response.json()
|
99 |
|
100 |
|
101 |
examples = ['Things are complicated because we still live together but we have separate lives',
|
|
|
107 |
|
108 |
iface = gr.Interface(fn=apply_ner, inputs=gr.inputs.Textbox(lines=5, placeholder="Enter your text here",
|
109 |
label='Check your text for compliance with the NVC rules'),
|
110 |
+
outputs=["html","text"], examples=examples)
|
111 |
iface.launch()
|
112 |
|