AIEcosystem commited on
Commit
b48cfd0
·
verified ·
1 Parent(s): 0024c4d

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +4 -34
src/streamlit_app.py CHANGED
@@ -452,39 +452,9 @@ def generate_html_report(df, text_input, elapsed_time, df_topic_data):
452
 
453
  # --- Page Configuration and Styling (No Sidebar) ---
454
  st.set_page_config(layout="wide", page_title="NER & Topic Report App")
455
- st.markdown(
456
- """
457
- <style>
458
- /* Overall app container - NO SIDEBAR */
459
- .main {
460
- background-color: #FFF0F5; /* Blanched Almond/Light Pink */
461
- color: #333333; /* Dark grey text for contrast */
462
- }
463
- .stApp {
464
- background-color: #FFF0F5;
465
- }
466
- /* Text Area background and text color (input fields) */
467
- .stTextArea textarea {
468
- background-color: #FFFAF0; /* Floral White/Near white for input fields */
469
- color: #000000; /* Black text for input */
470
- border: 1px solid #FF69B4; /* Deep Pink border */
471
- }
472
- /* Button styling */
473
- .stButton > button {
474
- background-color: #FF69B4; /* Deep Pink for the button */
475
- color: #FFFFFF; /* White text for contrast */
476
- border: none;
477
- padding: 10px 20px;
478
- border-radius: 5px;
479
- }
480
- /* Expander header and content background */
481
- .streamlit-expanderHeader, .streamlit-expanderContent {
482
- background-color: #FFE4E1; /* Misty Rose/Lighter Pink */
483
- color: #333333;
484
- }
485
- </style>
486
- """,
487
- unsafe_allow_html=True)
488
  st.subheader("NER and Topic Analysis Report Generator", divider="rainbow")
489
  st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
490
  expander = st.expander("**Important notes**")
@@ -510,7 +480,7 @@ category_mapping = {
510
  reverse_category_mapping = {label: category for category, label_list in category_mapping.items() for label in label_list}
511
 
512
  # --- Model Loading ---
513
- @st.cache_resourced
514
  def load_ner_model():
515
  """Loads the GLiNER model and caches it."""
516
  try:
 
452
 
453
  # --- Page Configuration and Styling (No Sidebar) ---
454
  st.set_page_config(layout="wide", page_title="NER & Topic Report App")
455
+
456
+
457
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  st.subheader("NER and Topic Analysis Report Generator", divider="rainbow")
459
  st.link_button("by nlpblogs", "https://nlpblogs.com", type="tertiary")
460
  expander = st.expander("**Important notes**")
 
480
  reverse_category_mapping = {label: category for category, label_list in category_mapping.items() for label in label_list}
481
 
482
  # --- Model Loading ---
483
+ @st.cache_resource
484
  def load_ner_model():
485
  """Loads the GLiNER model and caches it."""
486
  try: