Spaces:
Runtime error
Runtime error
Commit
·
1785439
1
Parent(s):
765df9f
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ nlp = spacy.load("en_core_web_sm")
|
|
6 |
def ner(sentence):
|
7 |
doc = nlp(sentence)
|
8 |
ents = [(e.text, e.label_) for e in doc.ents]
|
9 |
-
return ents
|
10 |
|
11 |
-
app = gr.Interface(fn=ner, inputs="text", outputs=[gr.HighlightedText(label="Text with entites")])
|
12 |
app.launch()
|
|
|
6 |
def ner(sentence):
|
7 |
doc = nlp(sentence)
|
8 |
ents = [(e.text, e.label_) for e in doc.ents]
|
9 |
+
return ents,ents
|
10 |
|
11 |
+
app = gr.Interface(fn=ner, inputs="text", outputs=["text",gr.HighlightedText(label="Text with entites")])
|
12 |
app.launch()
|