Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,10 +20,10 @@ def prediction(raw_text):
|
|
| 20 |
print()
|
| 21 |
st.write("------------------")
|
| 22 |
st.write("NERs in the sentence:")
|
| 23 |
-
spacy_streamlit.visualize(displacy.render(text1,style="ent"))
|
| 24 |
|
| 25 |
models = ["en_core_web_sm"]
|
| 26 |
-
|
| 27 |
#visualize_ner(text1, labels=nlp.get_pipe("ner").labels)
|
| 28 |
|
| 29 |
raw_text = """Ai-Khanoum (/aɪ ˈhɑːnjuːm/, meaning Lady Moon; Uzbek: Oyxonim) is the archaeological site of a Hellenistic city in Takhar Province, Afghanistan.
|
|
|
|
| 20 |
print()
|
| 21 |
st.write("------------------")
|
| 22 |
st.write("NERs in the sentence:")
|
| 23 |
+
#spacy_streamlit.visualize(displacy.render(text1,style="ent"))
|
| 24 |
|
| 25 |
models = ["en_core_web_sm"]
|
| 26 |
+
spacy_streamlit.visualize_ner(text1,labels = text1.ent)
|
| 27 |
#visualize_ner(text1, labels=nlp.get_pipe("ner").labels)
|
| 28 |
|
| 29 |
raw_text = """Ai-Khanoum (/aɪ ˈhɑːnjuːm/, meaning Lady Moon; Uzbek: Oyxonim) is the archaeological site of a Hellenistic city in Takhar Province, Afghanistan.
|