Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,6 +59,7 @@ def ner(text):
|
|
| 59 |
output = my_classifier(text)
|
| 60 |
for entity in output:
|
| 61 |
entity['entity'] = entity.pop('entity_group')
|
|
|
|
| 62 |
return {'text': text, 'entities': output}, text
|
| 63 |
|
| 64 |
examples = ['tôi cần thuê à tôi muốn bay một chuyến khứ_hồi từ đà_nẵng đến đà_lạt',
|
|
@@ -69,7 +70,7 @@ examples = ['tôi cần thuê à tôi muốn bay một chuyến khứ_hồi từ
|
|
| 69 |
|
| 70 |
demo = gr.Interface(ner,
|
| 71 |
gr.Textbox(label='Text', placeholder="Enter sentence here..."),
|
| 72 |
-
outputs=[gr.HighlightedText(label='Highlighted Output'), '
|
| 73 |
examples=examples,
|
| 74 |
title="Disfluency Detection",
|
| 75 |
description="This is an easy-to-use built in Gradio for desmontrating a NER System that identifies disfluency-entities in \
|
|
|
|
| 59 |
output = my_classifier(text)
|
| 60 |
for entity in output:
|
| 61 |
entity['entity'] = entity.pop('entity_group')
|
| 62 |
+
|
| 63 |
return {'text': text, 'entities': output}, text
|
| 64 |
|
| 65 |
examples = ['tôi cần thuê à tôi muốn bay một chuyến khứ_hồi từ đà_nẵng đến đà_lạt',
|
|
|
|
| 70 |
|
| 71 |
demo = gr.Interface(ner,
|
| 72 |
gr.Textbox(label='Text', placeholder="Enter sentence here..."),
|
| 73 |
+
outputs=[gr.HighlightedText(label='Highlighted Output'), gr.Textbox(label='RDR-Segmented sentence(Preprocessed before input to model)')],
|
| 74 |
examples=examples,
|
| 75 |
title="Disfluency Detection",
|
| 76 |
description="This is an easy-to-use built in Gradio for desmontrating a NER System that identifies disfluency-entities in \
|