Spaces:
Sleeping
Sleeping
Update pages/8Model Training.py
Browse files- pages/8Model Training.py +8 -9
pages/8Model Training.py
CHANGED
|
@@ -2,27 +2,24 @@ import streamlit as st
|
|
| 2 |
import numpy as np
|
| 3 |
import matplotlib.pyplot as plt
|
| 4 |
import pandas as pd
|
| 5 |
-
import cv2
|
| 6 |
-
import zipfile
|
| 7 |
-
import io
|
| 8 |
|
|
|
|
| 9 |
st.set_page_config(
|
| 10 |
-
page_title="
|
| 11 |
page_icon="🚀",
|
| 12 |
layout="wide"
|
| 13 |
)
|
| 14 |
|
| 15 |
-
#
|
| 16 |
if "current_page" not in st.session_state:
|
| 17 |
st.session_state.current_page = "main"
|
| 18 |
|
| 19 |
-
# Navigation function
|
| 20 |
def navigate_to(page_name):
|
| 21 |
st.session_state.current_page = page_name
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
|
| 27 |
st.markdown("""
|
| 28 |
<h1 style="text-align: center; color: #BB3385;">🛠️ Model Building</h1>
|
|
@@ -130,6 +127,7 @@ Let’s say we already have cleaned, tabular data. Here’s what we do:
|
|
| 130 |
st.markdown("## ✂️ Splitting the Data")
|
| 131 |
st.markdown("""
|
| 132 |
We don’t train on all data.
|
|
|
|
| 133 |
We split it into:
|
| 134 |
- **Training Set** – the data we use to teach the model
|
| 135 |
- **Testing Set** – the data we use to check how well the model learned
|
|
@@ -139,6 +137,7 @@ This is like:
|
|
| 139 |
- Writing a test paper (testing)
|
| 140 |
|
| 141 |
We usually split in ratios like 80:20 or 70:30.
|
|
|
|
| 142 |
And remember:
|
| 143 |
- No overlap between training and testing data
|
| 144 |
- Each data point should have equal chance to be in either group
|
|
|
|
| 2 |
import numpy as np
|
| 3 |
import matplotlib.pyplot as plt
|
| 4 |
import pandas as pd
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# ✅ Only ONE set_page_config, at the top
|
| 7 |
st.set_page_config(
|
| 8 |
+
page_title="Model Building",
|
| 9 |
page_icon="🚀",
|
| 10 |
layout="wide"
|
| 11 |
)
|
| 12 |
|
| 13 |
+
# Optional navigation state (you can remove if unused here)
|
| 14 |
if "current_page" not in st.session_state:
|
| 15 |
st.session_state.current_page = "main"
|
| 16 |
|
|
|
|
| 17 |
def navigate_to(page_name):
|
| 18 |
st.session_state.current_page = page_name
|
| 19 |
|
| 20 |
+
# ---------------------
|
| 21 |
+
# 📘 Model Building Content Starts Here
|
| 22 |
+
# ---------------------
|
| 23 |
|
| 24 |
st.markdown("""
|
| 25 |
<h1 style="text-align: center; color: #BB3385;">🛠️ Model Building</h1>
|
|
|
|
| 127 |
st.markdown("## ✂️ Splitting the Data")
|
| 128 |
st.markdown("""
|
| 129 |
We don’t train on all data.
|
| 130 |
+
|
| 131 |
We split it into:
|
| 132 |
- **Training Set** – the data we use to teach the model
|
| 133 |
- **Testing Set** – the data we use to check how well the model learned
|
|
|
|
| 137 |
- Writing a test paper (testing)
|
| 138 |
|
| 139 |
We usually split in ratios like 80:20 or 70:30.
|
| 140 |
+
|
| 141 |
And remember:
|
| 142 |
- No overlap between training and testing data
|
| 143 |
- Each data point should have equal chance to be in either group
|