Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import plotly.express as px
|
|
6 |
import numpy as np
|
7 |
st.set_page_config(page_title="Vocabulary Categorizer Two")
|
8 |
st.title("Vocabulary Categorizer Two")
|
9 |
-
st.write("
|
10 |
|
11 |
@st.cache(allow_output_mutation=True, show_spinner=False)
|
12 |
def Loading_NLP():
|
@@ -14,7 +14,7 @@ def Loading_NLP():
|
|
14 |
return nlp
|
15 |
@st.cache(allow_output_mutation=True)
|
16 |
def entRecognizer(entDict, typeEnt):
|
17 |
-
|
18 |
return entList
|
19 |
def plot_result(top_topics, scores):
|
20 |
top_topics = np.array(top_topics)
|
|
|
6 |
import numpy as np
|
7 |
st.set_page_config(page_title="Vocabulary Categorizer Two")
|
8 |
st.title("Vocabulary Categorizer Two")
|
9 |
+
st.write("This application can identify, highlight and categorize dates (DATE), geopolitical entities (GPE), locations (LOC), organizations (ORG), people (PERSON) in text.")
|
10 |
|
11 |
@st.cache(allow_output_mutation=True, show_spinner=False)
|
12 |
def Loading_NLP():
|
|
|
14 |
return nlp
|
15 |
@st.cache(allow_output_mutation=True)
|
16 |
def entRecognizer(entDict, typeEnt):
|
17 |
+
entList = [ent for ent in entDict if entDict[ent] == typeEnt]
|
18 |
return entList
|
19 |
def plot_result(top_topics, scores):
|
20 |
top_topics = np.array(top_topics)
|