Spaces:
Runtime error
Runtime error
pythiccoder
commited on
Commit
•
2ffba81
1
Parent(s):
33d17ea
Update app.py
Browse filesUpdated default test
app.py
CHANGED
@@ -8,6 +8,8 @@ from fastcoref import LingMessCoref
|
|
8 |
model = LingMessCoref()
|
9 |
nlp = spacy.blank("en")
|
10 |
|
|
|
|
|
11 |
def corefer(text):
|
12 |
preds = model.predict(texts=[text])
|
13 |
clusters = preds[0].get_clusters(as_strings=False)
|
@@ -21,6 +23,6 @@ def corefer(text):
|
|
21 |
|
22 |
|
23 |
iface = gr.Interface(fn=corefer,
|
24 |
-
inputs=gr.Textbox(label="Enter Text To Corefer with FastCoref", lines=2, value=
|
25 |
outputs="html")
|
26 |
iface.launch()
|
|
|
8 |
model = LingMessCoref()
|
9 |
nlp = spacy.blank("en")
|
10 |
|
11 |
+
default = "Lionel Messi has won a record seven Ballon d'Or awards. He signed for Paris Saint-Germain in August 2021. “I would like to thank my family” said the Argentinian footballer. Messi holds the records for most goals in La Liga. Paris Saint-Germain hopes he will do the same in Ligue 1."
|
12 |
+
|
13 |
def corefer(text):
|
14 |
preds = model.predict(texts=[text])
|
15 |
clusters = preds[0].get_clusters(as_strings=False)
|
|
|
23 |
|
24 |
|
25 |
iface = gr.Interface(fn=corefer,
|
26 |
+
inputs=gr.Textbox(label="Enter Text To Corefer with FastCoref", lines=2, value=default),
|
27 |
outputs="html")
|
28 |
iface.launch()
|