Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ def main():
|
|
16 |
spacy_model = "en_core_web_sm"
|
17 |
st.title('Entity Extraction')
|
18 |
|
19 |
-
menu = ["Home","NER"]
|
20 |
-
choice = st.sidebar.selectbox("Menu", menu)
|
21 |
with st.sidebar:
|
22 |
st.write("Sample Text")
|
23 |
st.write("""Ai-Khanoum (/aɪ ˈhɑːnjuːm/, meaning Lady Moon; Uzbek: Oyxonim) is the archaeological site of a Hellenistic city in Takhar Province, Afghanistan.
|
@@ -27,19 +27,17 @@ archaeologists until the outbreak of conflict in Afghanistan in the late 1970s.
|
|
27 |
st.write("""The Indian Space Research Organisation or is the national space agency of India, headquartered in Bengaluru.
|
28 |
It operates under Department of Space which is directly overseen by the Prime Minister of India while Chairman of ISRO acts as executive of DOS as well.""")
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
raw_text = st.text_area("Your Text","Enter the Text Here")
|
40 |
-
docx = nlp(raw_text)
|
41 |
spacy_streamlit.visualize_ner(docx,labels = nlp.get_pipe('ner').labels,show_table = False)
|
42 |
-
|
43 |
|
44 |
|
45 |
|
|
|
16 |
spacy_model = "en_core_web_sm"
|
17 |
st.title('Entity Extraction')
|
18 |
|
19 |
+
#menu = ["Home","NER"]
|
20 |
+
#choice = st.sidebar.selectbox("Menu", menu)
|
21 |
with st.sidebar:
|
22 |
st.write("Sample Text")
|
23 |
st.write("""Ai-Khanoum (/aɪ ˈhɑːnjuːm/, meaning Lady Moon; Uzbek: Oyxonim) is the archaeological site of a Hellenistic city in Takhar Province, Afghanistan.
|
|
|
27 |
st.write("""The Indian Space Research Organisation or is the national space agency of India, headquartered in Bengaluru.
|
28 |
It operates under Department of Space which is directly overseen by the Prime Minister of India while Chairman of ISRO acts as executive of DOS as well.""")
|
29 |
|
30 |
+
st.subheader("Tokenization")
|
31 |
+
raw_text = st.text_area("Your Text","Enter the Text Here")
|
32 |
+
docx = nlp(raw_text)
|
33 |
+
if st.button("Tokenize"):
|
34 |
+
spacy_streamlit.visualize_tokens(docx,attrs = ['text','pos_','dep_','ent_type_'])
|
35 |
+
|
36 |
+
st.subheader("Name Entity Recognition")
|
37 |
+
if st.button("Entity Extraction"):
|
38 |
+
|
|
|
|
|
39 |
spacy_streamlit.visualize_ner(docx,labels = nlp.get_pipe('ner').labels,show_table = False)
|
40 |
+
|
41 |
|
42 |
|
43 |
|