Spaces:
Runtime error
Runtime error
David
commited on
Commit
•
bfa7f67
1
Parent(s):
386370d
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ def ner(text):
|
|
13 |
doc = nlp(text)
|
14 |
text = " ".join([token.text for token in doc])
|
15 |
predictions = pl(text)
|
16 |
-
mentions = [pred["word"].strip() for pred in predictions if pred["entity_group"] == "
|
17 |
return "\n".join(mentions)
|
18 |
|
19 |
iface = gr.Interface(
|
|
|
13 |
doc = nlp(text)
|
14 |
text = " ".join([token.text for token in doc])
|
15 |
predictions = pl(text)
|
16 |
+
mentions = [pred["word"].strip() for pred in predictions if pred["entity_group"] == "FOOD"]
|
17 |
return "\n".join(mentions)
|
18 |
|
19 |
iface = gr.Interface(
|