Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -3
src/streamlit_app.py
CHANGED
@@ -77,7 +77,7 @@ st.set_page_config(layout="wide", page_title="Named Entity Recognition App")
|
|
77 |
st.subheader("StoryCraft", divider="blue")
|
78 |
st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
|
79 |
expander = st.expander("**Important notes**")
|
80 |
-
expander.write("""**Named Entities:** This StoryCraft predicts eighteen (18) labels: "Person", "Organization", "Location", "Date", "Time", "Quantity", "Product", "Event", "Title", "Job_title", "Artwork", "Media", "URL", "Website", "Hashtag", "
|
81 |
|
82 |
Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
|
83 |
|
@@ -119,7 +119,7 @@ if not comet_initialized:
|
|
119 |
st.warning("Comet ML not initialized. Check environment variables.")
|
120 |
|
121 |
# --- Label Definitions ---
|
122 |
-
labels = ["Person","Organization","Location","Date","Time","Quantity","Product","Event","Title","Job_title","Artwork","Media","URL","Website","Hashtag","
|
123 |
|
124 |
# Corrected mapping dictionary
|
125 |
|
@@ -127,7 +127,7 @@ labels = ["Person","Organization","Location","Date","Time","Quantity","Product",
|
|
127 |
category_mapping = {
|
128 |
"Core Foundational Entities": ["Person", "Organization", "Location", "Date", "Time", "Quantity"],
|
129 |
"Content Enrichment Entities": ["Product", "Event", "Title", "Job_title", "Artwork", "Media"],
|
130 |
-
"Digital & Technical Entities": ["URL", "Website", "Hashtag", "
|
131 |
}
|
132 |
|
133 |
# --- Model Loading ---
|
|
|
77 |
st.subheader("StoryCraft", divider="blue")
|
78 |
st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
|
79 |
expander = st.expander("**Important notes**")
|
80 |
+
expander.write("""**Named Entities:** This StoryCraft predicts eighteen (18) labels: "Person", "Organization", "Location", "Date", "Time", "Quantity", "Product", "Event", "Title", "Job_title", "Artwork", "Media", "URL", "Website", "Hashtag", "Email", "IP_address", "File_path"
|
81 |
|
82 |
Results are presented in easy-to-read tables, visualized in an interactive tree map, pie chart and bar chart, and are available for download along with a Glossary of tags.
|
83 |
|
|
|
119 |
st.warning("Comet ML not initialized. Check environment variables.")
|
120 |
|
121 |
# --- Label Definitions ---
|
122 |
+
labels = ["Person","Organization","Location","Date","Time","Quantity","Product","Event","Title","Job_title","Artwork","Media","URL","Website","Hashtag","Email","IP_address","File_path"]
|
123 |
|
124 |
# Corrected mapping dictionary
|
125 |
|
|
|
127 |
category_mapping = {
|
128 |
"Core Foundational Entities": ["Person", "Organization", "Location", "Date", "Time", "Quantity"],
|
129 |
"Content Enrichment Entities": ["Product", "Event", "Title", "Job_title", "Artwork", "Media"],
|
130 |
+
"Digital & Technical Entities": ["URL", "Website", "Hashtag", "Email", "IP_address", "File_path"],
|
131 |
}
|
132 |
|
133 |
# --- Model Loading ---
|