Spaces:
Running
Running
File size: 1,179 Bytes
7184c06 21823a6 ecc39ab 21823a6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# In 3_Interactive_Dashboard.py
import streamlit as st
from utils.results_manager import ResultsManager
from modules.analyzer import BatchAnalysis # Adjusted import path
st.set_page_config(page_title="Analysis Dashboard", layout="wide")
# --- INITIALIZE SESSION STATE FOR THIS PAGE ---
if "cm_filter_active" not in st.session_state:
st.session_state["cm_filter_active"] = False
if "selected_spectrum_file" not in st.session_state:
st.session_state["selected_spectrum_file"] = (
None # Stores the filename of the clicked row
)
# --- END INITIALIZATION ---
st.title("Interactive Analysis Dashboard")
st.markdown(
"Dive deeper into your batch results. Use the charts below to analyze model performance."
)
st.divider()
# --- Initialize session state for CM filter ---
if "cm_filter_active" not in st.session_state:
st.session_state["cm_filter_active"] = False
# Get the results from the session state
results_df = ResultsManager.get_results_dataframe()
# Create an instance of our analyzer with the results
analyzer = BatchAnalysis(results_df)
# Render the entire dashboard with one line!
analyzer.render()
|