saritha5 commited on
Commit
f4e047c
·
1 Parent(s): 69562f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- #spacy_streamlit.visualize_ner(text1,labels = word.label_)
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.