Spaces:
Runtime error
Runtime error
Changing example sentences for NER
Browse files
app.py
CHANGED
@@ -3,16 +3,15 @@ from transformers import pipeline
|
|
3 |
|
4 |
def generate_story(story):
|
5 |
ner = pipeline("ner", model="dbmdz/bert-large-cased-finetuned-conll03-english")
|
6 |
-
return str(ner(
|
7 |
|
8 |
demo = gr.Interface (
|
9 |
fn=generate_story,
|
10 |
description="Named Entity Recognition Demo with BERT",
|
11 |
examples=[
|
12 |
-
["
|
13 |
-
["
|
14 |
-
["
|
15 |
-
["The bear reached the river and spotted a school of fish. His hunger started taking its toll."]
|
16 |
],
|
17 |
inputs=[gr.Textbox(lines=7, label="Text")],
|
18 |
outputs=[gr.Textbox(lines=7, label="Story NER")]
|
|
|
3 |
|
4 |
def generate_story(story):
|
5 |
ner = pipeline("ner", model="dbmdz/bert-large-cased-finetuned-conll03-english")
|
6 |
+
return str(ner(story))
|
7 |
|
8 |
demo = gr.Interface (
|
9 |
fn=generate_story,
|
10 |
description="Named Entity Recognition Demo with BERT",
|
11 |
examples=[
|
12 |
+
["England won the 2019 world cup vs The 2019 world cup happened in England."],
|
13 |
+
["Washington is the capital of the US vs The first president of the US was Washington."],
|
14 |
+
["My name is Ganesh Kamath and I work at AMD in Bangalore."]
|
|
|
15 |
],
|
16 |
inputs=[gr.Textbox(lines=7, label="Text")],
|
17 |
outputs=[gr.Textbox(lines=7, label="Story NER")]
|