Spaces:
Sleeping
Sleeping
| # streamlit_app.py | |
| import streamlit as st | |
| # Set config immediately | |
| st.set_page_config( | |
| page_title="Asenturisk AI Benchmark Kit 26", | |
| layout="wide", | |
| initial_sidebar_state="expanded" | |
| ) | |
| # Robust imports with error handling | |
| try: | |
| from data_loader import dataset_sidebar | |
| from eda import run_eda | |
| from clustering import run_clustering | |
| from benchmarking import run_benchmarking | |
| except ImportError as e: | |
| st.error(f"Critical Error: Missing modules. Please ensure all files are present. Details: {e}") | |
| st.stop() | |
| def init_session_state(): | |
| """Initialize all necessary session state variables safely.""" | |
| defaults = { | |
| "original_df": None, | |
| "processed_df": None, | |
| "target_col": None, | |
| "feature_cols": [], | |
| "model_results": None | |
| } | |
| for key, value in defaults.items(): | |
| if key not in st.session_state: | |
| st.session_state[key] = value | |
| def main(): | |
| st.title("π Asenturisk AI Benchmarking Kit 26 Pro") | |
| st.markdown("### Professional Grade AI/ML Evaluation Suite") | |
| st.markdown("---") | |
| init_session_state() | |
| # Sidebar Data Loading | |
| dataset_sidebar() | |
| # Main Content Area | |
| if st.session_state.original_df is None: | |
| st.info("π Welcome! Please load a dataset via the sidebar to begin analysis.") | |
| return | |
| # Tabs for logical separation | |
| tabs = st.tabs(["π Deep EDA", "π§ Advanced Clustering", "βοΈ Model Benchmarking"]) | |
| with tabs[0]: | |
| run_eda() | |
| with tabs[1]: | |
| run_clustering() | |
| with tabs[2]: | |
| run_benchmarking() | |
| if __name__ == "__main__": | |
| main() |