Commit
·
d20062f
1
Parent(s):
e1c577b
update app
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def extract_entities(sentence):
|
|
| 34 |
for key in results.keys():
|
| 35 |
entity_results.append(print_nicely(results[key]))
|
| 36 |
|
| 37 |
-
return
|
| 38 |
|
| 39 |
|
| 40 |
# Create Gradio interface
|
|
@@ -42,7 +42,7 @@ def ner_app_interface():
|
|
| 42 |
input_sentence = gr.Textbox(
|
| 43 |
lines=5, label="Input Sentence", placeholder="Enter a sentence for NER..."
|
| 44 |
)
|
| 45 |
-
output_entities = gr.
|
| 46 |
|
| 47 |
# Interface definition
|
| 48 |
interface = gr.Interface(
|
|
|
|
| 34 |
for key in results.keys():
|
| 35 |
entity_results.append(print_nicely(results[key]))
|
| 36 |
|
| 37 |
+
return results
|
| 38 |
|
| 39 |
|
| 40 |
# Create Gradio interface
|
|
|
|
| 42 |
input_sentence = gr.Textbox(
|
| 43 |
lines=5, label="Input Sentence", placeholder="Enter a sentence for NER..."
|
| 44 |
)
|
| 45 |
+
output_entities = gr.HighlightedText(label="Extracted Entities")
|
| 46 |
|
| 47 |
# Interface definition
|
| 48 |
interface = gr.Interface(
|