update
Browse files
app.py
CHANGED
@@ -4,16 +4,6 @@ from spacy import displacy
|
|
4 |
|
5 |
model = TransformersNER("tner/roberta-large-ontonotes5")
|
6 |
|
7 |
-
# DUMMY = {
|
8 |
-
# 'prediction': [['B-person', 'I-person', 'O', 'O', 'O', 'O', 'O', 'O', 'O', 'B-location']],
|
9 |
-
# 'probability': [[0.9967652559280396, 0.9994561076164246, 0.9986955523490906, 0.9947081804275513, 0.6129112243652344, 0.9984312653541565, 0.9868122935295105, 0.9983410835266113, 0.9995284080505371, 0.9838910698890686]],
|
10 |
-
# 'input': [['Jacob', 'Collier', 'is', 'a', 'Grammy', 'awarded', 'English', 'artist', 'from', 'London']],
|
11 |
-
# 'entity_prediction': [[
|
12 |
-
# {'type': 'person', 'entity': ['Jacob', 'Collier'], 'position': [0, 1], 'probability': [0.9967652559280396, 0.9994561076164246]},
|
13 |
-
# {'type': 'location', 'entity': ['London'], 'position': [9], 'probability': [0.9838910698890686]}
|
14 |
-
# ]]
|
15 |
-
# }
|
16 |
-
|
17 |
examples = [
|
18 |
"Jacob Collier is a Grammy awarded artist from England.",
|
19 |
"When Sebastian Thrun PERSON started working on self-driving cars at Google ORG in 2007 DATE , few people outside of the company took him seriously.",
|
@@ -56,8 +46,8 @@ demo = gr.Interface(
|
|
56 |
lines=5,
|
57 |
placeholder="Input Sentence",
|
58 |
default=examples[0],
|
59 |
-
examples=examples
|
60 |
),
|
61 |
outputs="html",
|
|
|
62 |
)
|
63 |
demo.launch()
|
|
|
4 |
|
5 |
model = TransformersNER("tner/roberta-large-ontonotes5")
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
examples = [
|
8 |
"Jacob Collier is a Grammy awarded artist from England.",
|
9 |
"When Sebastian Thrun PERSON started working on self-driving cars at Google ORG in 2007 DATE , few people outside of the company took him seriously.",
|
|
|
46 |
lines=5,
|
47 |
placeholder="Input Sentence",
|
48 |
default=examples[0],
|
|
|
49 |
),
|
50 |
outputs="html",
|
51 |
+
examples=examples
|
52 |
)
|
53 |
demo.launch()
|