@@ -6652,6 +6775,38 @@ def update_progress(progress, message=""):
.main, .stApp {
background: #181f2f;
}
+
+ /* Sidebar dark mode styling */
+ .stSidebar {
+ background: #232a3d !important;
+ color: #f8fafc !important;
+ }
+
+ .stSidebar .stMarkdown {
+ color: #f8fafc !important;
+ }
+
+ .stSidebar label {
+ color: #f8fafc !important;
+ }
+
+ .stSidebar .stExpander {
+ background: #232a3d !important;
+ border: 1px solid #324a7c !important;
+ }
+
+ .stSidebar .stCheckbox label {
+ color: #f8fafc !important;
+ }
+
+ .stSidebar .stRadio label {
+ color: #f8fafc !important;
+ }
+
+ .stSidebar .stSelectbox label {
+ color: #f8fafc !important;
+ }
+
.metric-container, .prediction-card, .ensemble-card, .feature-card, .model-info, .ensemble-method, .method-comparison {
background: #232a3d;
border-radius: 16px;
@@ -6716,6 +6871,166 @@ def update_progress(progress, message=""):
.main, .stApp {
background: #f4f8ff;
}
+
+ /* Sidebar light mode styling */
+ .stSidebar {
+ background: #ffffff !important;
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stMarkdown {
+ color: #232a3d !important;
+ }
+
+ .stSidebar label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stExpander {
+ background: #ffffff !important;
+ border: 1px solid #b3c7f7 !important;
+ }
+
+ .stSidebar .stCheckbox label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stRadio label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stSelectbox label {
+ color: #232a3d !important;
+ }
+
+ /* Additional sidebar elements for light mode */
+ .stSidebar .stText {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stMetric {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stSelectbox > div > div {
+ background: #ffffff !important;
+ color: #232a3d !important;
+ border: 1px solid #b3c7f7 !important;
+ }
+
+ .stSidebar .stSelectbox > div > div > div {
+ background: #ffffff !important;
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stCheckbox > div > label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stRadio > div > label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stNumberInput label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stSlider label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stProgress label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stInfo {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stSuccess {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stWarning {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stError {
+ color: #232a3d !important;
+ }
+
+ /* Force sidebar text visibility in light mode */
+ .stSidebar * {
+ color: #232a3d !important;
+ }
+
+ .stSidebar div {
+ color: #232a3d !important;
+ }
+
+ .stSidebar span {
+ color: #232a3d !important;
+ }
+
+ .stSidebar p {
+ color: #232a3d !important;
+ }
+
+ .stSidebar h1, .stSidebar h2, .stSidebar h3, .stSidebar h4, .stSidebar h5, .stSidebar h6 {
+ color: #232a3d !important;
+ }
+
+ /* Specific targeting for Streamlit components */
+ .stSidebar [data-testid="stCheckbox"] label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar [data-testid="stRadio"] label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar [data-testid="stSelectbox"] label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar [data-testid="stExpander"] label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar [data-testid="stText"] {
+ color: #232a3d !important;
+ }
+
+ .stSidebar [data-testid="stMetric"] {
+ color: #232a3d !important;
+ }
+
+ /* Override any inherited light colors */
+ .stSidebar .stMarkdown p {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stMarkdown div {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stMarkdown span {
+ color: #232a3d !important;
+ }
+
+ /* Ensure form elements are visible */
+ .stSidebar .stForm label {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stForm div {
+ color: #232a3d !important;
+ }
+
+ .stSidebar .stForm span {
+ color: #232a3d !important;
+ }
+
.metric-container, .prediction-card, .ensemble-card, .feature-card, .model-info, .ensemble-method, .method-comparison {
background: #e3eafc;
border-radius: 16px;
@@ -6787,7 +7102,7 @@ def render_spamlyser_dashboard():
st.markdown("---")
st.markdown("""
-
+
đ Advanced Analytics Dashboard
@@ -6797,28 +7112,52 @@ def render_spamlyser_dashboard():
""", unsafe_allow_html=True)
- # Dashboard tabs
- # Dashboard tabs
+ # Dashboard tabs with proper container
+ st.markdown('
', unsafe_allow_html=True)
+
dashboard_tabs = st.tabs(["đ¯ Overview", "đ¤ Model Performance", "đ§ Ensemble Analytics", "đ Detailed Stats", "⥠Real-time Monitor"])
with dashboard_tabs[0]: # Overview Tab
+ st.markdown('
', unsafe_allow_html=True)
render_overview_dashboard()
+ st.markdown('
', unsafe_allow_html=True)
with dashboard_tabs[1]: # Model Performance Tab
+ st.markdown('
', unsafe_allow_html=True)
render_model_performance_dashboard()
+ st.markdown('
', unsafe_allow_html=True)
with dashboard_tabs[2]: # Ensemble Analytics Tab
+ st.markdown('
', unsafe_allow_html=True)
render_ensemble_dashboard()
+ st.markdown('
', unsafe_allow_html=True)
with dashboard_tabs[3]: # Detailed Stats Tab
+ st.markdown('
', unsafe_allow_html=True)
render_detailed_stats_dashboard()
+ st.markdown('
', unsafe_allow_html=True)
with dashboard_tabs[4]: # Real-time Monitor Tab
+ st.markdown('
', unsafe_allow_html=True)
render_realtime_monitor()
+ st.markdown('
', unsafe_allow_html=True)
+
+ st.markdown('
', unsafe_allow_html=True)
def render_overview_dashboard():
st.markdown("""
""", unsafe_allow_html=True)
@@ -7427,7 +7778,7 @@ def render_realtime_monitor():
# Add this to your main app.py file after your existing analysis section:
# --- ADD THE DASHBOARD SECTION ---
-if st.sidebar.button("đ Open Dashboard", key="open_dashboard", help="Open the advanced analytics dashboard"):
+if st.sidebar.button("đ Open Dashboard", key="open_dashboard"):
st.session_state.show_dashboard = True
if st.session_state.get('show_dashboard', False):
@@ -8627,39 +8978,52 @@ def classify_csv(file, ensemble_mode, selected_models_for_bulk, selected_ensembl
""", unsafe_allow_html=True)
+
# Create beautiful navigation links in columns
col1, col2, col3, col4, col5 = st.columns(5)
with col1:
- if st.button("đ Home", key="nav_home", use_container_width=True):
+ if st.button("Home", key="nav_home", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('home')
- if st.button("âšī¸ About", key="nav_about", use_container_width=True):
+ if st.button("About", key="nav_about", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('about')
with col2:
- if st.button("⥠Features", key="nav_features", use_container_width=True):
+ if st.button("Features", key="nav_features", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('features')
- if st.button("đ Analytics", key="nav_analytics", use_container_width=True):
+ if st.button("Analytics", key="nav_analytics", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('analytics')
with col3:
- if st.button("đ¤ Models", key="nav_models", use_container_width=True):
+ if st.button("Models", key="nav_models", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('models')
- if st.button("đŦ Feedback", key="nav_feedback", use_container_width=True):
+ if st.button("Feedback", key="nav_feedback", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('feedback')
with col4:
- if st.button("đ Contact", key="nav_contact", use_container_width=True):
+ if st.button("Contact", key="nav_contact", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('contact')
- if st.button("đ Docs", key="nav_docs", use_container_width=True):
+ if st.button("Docs", key="nav_docs", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('docs')
with col5:
- if st.button("đ API", key="nav_api", use_container_width=True):
+ if st.button("API", key="nav_api", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('api')
- if st.button("âī¸ Settings", key="nav_settings", use_container_width=True):
+ if st.button("Settings", key="nav_settings", use_container_width=True):
+ st.markdown('', unsafe_allow_html=True)
navigate_to('settings')
+
+
# Beautiful Footer Info Section
# Clean and simple footer info
st.markdown("---")
@@ -8690,31 +9054,5 @@ def classify_csv(file, ensemble_mode, selected_models_for_bulk, selected_ensembl
)
# --- Main Execution ---
-# Route to appropriate page based on session state
-if st.session_state.current_page == 'home':
- show_home_page()
-elif st.session_state.current_page == 'analyzer':
- # All the above analyzer content has already been executed
- pass
-elif st.session_state.current_page == 'about':
- show_about_page()
-elif st.session_state.current_page == 'features':
- show_features_page()
-elif st.session_state.current_page == 'analytics':
- show_analytics_page()
-elif st.session_state.current_page == 'models':
- show_models_page()
-elif st.session_state.current_page == 'help':
- show_help_page()
-elif st.session_state.current_page == 'contact':
- show_contact_page()
-elif st.session_state.current_page == 'docs':
- show_docs_page()
-elif st.session_state.current_page == 'api':
- show_api_page()
-elif st.session_state.current_page == 'settings':
- show_settings_page()
-else:
- # Default to home page
- st.session_state.current_page = 'home'
- show_home_page()
+# Call the main function to handle routing
+main()
diff --git a/feedback_data.json b/feedback_data.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/feedback_data.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/models/__pycache__/__init__.cpython-314.pyc b/models/__pycache__/__init__.cpython-314.pyc
new file mode 100644
index 0000000..2da5998
Binary files /dev/null and b/models/__pycache__/__init__.cpython-314.pyc differ
diff --git a/models/__pycache__/batch_processor.cpython-314.pyc b/models/__pycache__/batch_processor.cpython-314.pyc
new file mode 100644
index 0000000..cfe08ba
Binary files /dev/null and b/models/__pycache__/batch_processor.cpython-314.pyc differ
diff --git a/models/__pycache__/ensemble_classifier_method.cpython-314.pyc b/models/__pycache__/ensemble_classifier_method.cpython-314.pyc
new file mode 100644
index 0000000..5c13266
Binary files /dev/null and b/models/__pycache__/ensemble_classifier_method.cpython-314.pyc differ
diff --git a/models/__pycache__/export_feature.cpython-314.pyc b/models/__pycache__/export_feature.cpython-314.pyc
new file mode 100644
index 0000000..7c966a8
Binary files /dev/null and b/models/__pycache__/export_feature.cpython-314.pyc differ
diff --git a/models/__pycache__/feedback_handler.cpython-314.pyc b/models/__pycache__/feedback_handler.cpython-314.pyc
new file mode 100644
index 0000000..8eda583
Binary files /dev/null and b/models/__pycache__/feedback_handler.cpython-314.pyc differ
diff --git a/models/__pycache__/model_init.cpython-314.pyc b/models/__pycache__/model_init.cpython-314.pyc
new file mode 100644
index 0000000..5ee4068
Binary files /dev/null and b/models/__pycache__/model_init.cpython-314.pyc differ
diff --git a/models/__pycache__/threat_analyzer.cpython-314.pyc b/models/__pycache__/threat_analyzer.cpython-314.pyc
new file mode 100644
index 0000000..bc3be6f
Binary files /dev/null and b/models/__pycache__/threat_analyzer.cpython-314.pyc differ
diff --git a/models/__pycache__/word_analyzer.cpython-314.pyc b/models/__pycache__/word_analyzer.cpython-314.pyc
new file mode 100644
index 0000000..bf864d5
Binary files /dev/null and b/models/__pycache__/word_analyzer.cpython-314.pyc differ