David commited on
Commit
bfa7f67
1 Parent(s): 386370d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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"] == "LABEL_1"]
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(