Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,8 @@ import pandas as pd
|
|
| 3 |
from pycaret.classification import *
|
| 4 |
from pycaret.regression import *
|
| 5 |
from pycaret.clustering import *
|
|
|
|
|
|
|
| 6 |
import os
|
| 7 |
|
| 8 |
# Set page config
|
|
@@ -16,7 +18,7 @@ with st.sidebar:
|
|
| 16 |
app_mode = st.selectbox("Navigation", ["Data Upload", "Model Training", "Validation & Exploration"])
|
| 17 |
data_type = st.selectbox("Data Type", ["Tabular"])
|
| 18 |
st.markdown("---")
|
| 19 |
-
st.markdown("**Dependencies**: `pycaret`, `pandas`, `streamlit`")
|
| 20 |
st.markdown("Created by Calvin Allen-Crawford | v2.0 | © 2025")
|
| 21 |
|
| 22 |
# Main App Sections
|
|
@@ -36,6 +38,14 @@ if app_mode == "Data Upload":
|
|
| 36 |
with col2: st.metric("Columns", df.shape[1])
|
| 37 |
with col3: st.metric("Missing Values", df.isna().sum().sum())
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
elif app_mode == "Model Training":
|
| 40 |
st.title("🧠 Model Training")
|
| 41 |
if 'df' not in st.session_state:
|
|
|
|
| 3 |
from pycaret.classification import *
|
| 4 |
from pycaret.regression import *
|
| 5 |
from pycaret.clustering import *
|
| 6 |
+
from ydata_profiling import ProfileReport
|
| 7 |
+
from streamlit_pandas_profiling import st_profile_report
|
| 8 |
import os
|
| 9 |
|
| 10 |
# Set page config
|
|
|
|
| 18 |
app_mode = st.selectbox("Navigation", ["Data Upload", "Model Training", "Validation & Exploration"])
|
| 19 |
data_type = st.selectbox("Data Type", ["Tabular"])
|
| 20 |
st.markdown("---")
|
| 21 |
+
st.markdown("**Dependencies**: `pycaret`, `pandas`, `streamlit`, `ydata-profiling`")
|
| 22 |
st.markdown("Created by Calvin Allen-Crawford | v2.0 | © 2025")
|
| 23 |
|
| 24 |
# Main App Sections
|
|
|
|
| 38 |
with col2: st.metric("Columns", df.shape[1])
|
| 39 |
with col3: st.metric("Missing Values", df.isna().sum().sum())
|
| 40 |
|
| 41 |
+
# Generate and display ydata-profiling report
|
| 42 |
+
st.write("---")
|
| 43 |
+
st.subheader("Exploratory Data Analysis (EDA)")
|
| 44 |
+
if st.button("Generate EDA Report"):
|
| 45 |
+
with st.spinner("Generating EDA Report..."):
|
| 46 |
+
profile = ProfileReport(df, explorative=True)
|
| 47 |
+
st_profile_report(profile)
|
| 48 |
+
|
| 49 |
elif app_mode == "Model Training":
|
| 50 |
st.title("🧠 Model Training")
|
| 51 |
if 'df' not in st.session_state:
|