File size: 1,625 Bytes
963afa9
9722ba2
1870afe
963afa9
1870afe
963afa9
 
 
1870afe
f44a341
963afa9
 
 
 
 
 
 
 
1870afe
3885fc1
963afa9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# 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()