Kabeer Akande commited on
Commit
0294383
1 Parent(s): 97fe6e9

adds further arguments

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -20,12 +20,22 @@ def predict_entities(text):
20
  return highlighted_text
21
 
22
  # gradio interface
23
- iface = gr.Interface(
 
 
 
 
 
 
 
 
24
  fn=predict_entities,
25
  inputs=gr.Textbox(lines=5, placeholder="Enter text..."),
26
  outputs=gr.HTML(),
27
- title="Named Entity Identification",
28
- description="Enter text to identify entities using the model.",
 
 
29
  )
30
 
31
  iface.launch()
 
20
  return highlighted_text
21
 
22
  # gradio interface
23
+ title = "Named Entity Recognizer"
24
+
25
+ description = """
26
+ This model has been trained to identify entities in a given text. It returns the input text with the entities highlighted in green. Give it a try!
27
+ """
28
+
29
+ article = "The model is trained using bert-finetuned-ner."
30
+
31
+ iface = gr.Interface(
32
  fn=predict_entities,
33
  inputs=gr.Textbox(lines=5, placeholder="Enter text..."),
34
  outputs=gr.HTML(),
35
+ title=title,
36
+ description=description,
37
+ article=article,
38
+ examples=[["Hello, I am Kabeer. I work as a machine learning engineer at OVO in the UK"], ["This is Maryam who is a Leicester based NHS Doctor"]],
39
  )
40
 
41
  iface.launch()