Spaces:
Runtime error
Runtime error
Roland Szabo
commited on
Commit
•
5e4308a
1
Parent(s):
b9dcc50
Add example and description
Browse files
app.py
CHANGED
@@ -43,8 +43,19 @@ def greet(model_type, text):
|
|
43 |
for entity in response["Entities"]]}
|
44 |
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
demo = gr.Interface(fn=greet, inputs=[gr.Radio(["Spacy", "Roberta", "AWS Comprehend"]), "text"],
|
47 |
-
outputs="highlight", title="NER
|
48 |
-
description=
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
demo.launch()
|
|
|
43 |
for entity in response["Entities"]]}
|
44 |
|
45 |
|
46 |
+
description = """Compare the NER outputs of Spacy, HuggingFace Roberta and AWS Comprehend.
|
47 |
+
|
48 |
+
These models are off the shelf models, which have not been finetuned. This is just to show a baseline,
|
49 |
+
before we start finetuning the models. All of them can be finetuned (including AWS Comprehend).
|
50 |
+
AWS Comprehend can be finetuned using Entity lists, without having to annotate full documents by hand."""
|
51 |
+
|
52 |
demo = gr.Interface(fn=greet, inputs=[gr.Radio(["Spacy", "Roberta", "AWS Comprehend"]), "text"],
|
53 |
+
outputs="highlight", title="Comparison of NER Options",
|
54 |
+
description=description,
|
55 |
+
examples=[["AWS Comprehend", """We hereby issue in your favour this documentary credit which is available by
|
56 |
+
negotiation of your drafts at sight drawn on L/C Openers Bank at Chennai on account of
|
57 |
+
M/s.TANGEDCO Limited bearing the number, date of the documentary credit and the
|
58 |
+
name of the issuing bank of this credit for 100% invoice value accompanied by the
|
59 |
+
following documents."""]],)
|
60 |
|
61 |
+
demo.launch()
|