Update app.py
Browse files
app.py
CHANGED
|
@@ -72,6 +72,9 @@ if st.sidebar.button("Model Report"):
|
|
| 72 |
if st.sidebar.button("Hands-on Model"):
|
| 73 |
switch_page("Hands-on Model")
|
| 74 |
|
|
|
|
|
|
|
|
|
|
| 75 |
# Model Report Page
|
| 76 |
if st.session_state.current_page == "Model Report":
|
| 77 |
st.markdown("<h1 class='title'>Model Report</h1>", unsafe_allow_html=True)
|
|
@@ -183,7 +186,40 @@ elif st.session_state.current_page == "Data Collection":
|
|
| 183 |
|
| 184 |
if st.button("๐ Go Back to Model Report"):
|
| 185 |
switch_page("Model Report")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
|
| 188 |
# Hands-on Model Page
|
| 189 |
elif st.session_state.current_page == "Hands-on Model":
|
|
|
|
| 72 |
if st.sidebar.button("Hands-on Model"):
|
| 73 |
switch_page("Hands-on Model")
|
| 74 |
|
| 75 |
+
## Importing Data
|
| 76 |
+
data = pd.read_csv(" Life Expectancy Data.csv")
|
| 77 |
+
|
| 78 |
# Model Report Page
|
| 79 |
if st.session_state.current_page == "Model Report":
|
| 80 |
st.markdown("<h1 class='title'>Model Report</h1>", unsafe_allow_html=True)
|
|
|
|
| 186 |
|
| 187 |
if st.button("๐ Go Back to Model Report"):
|
| 188 |
switch_page("Model Report")
|
| 189 |
+
|
| 190 |
+
|
| 191 |
+
|
| 192 |
+
elif st.session_state.current_page == "Simple EDA":
|
| 193 |
+
st.markdown("<h1 class='title'>Simple Exploratory Data Analysis</h1>", unsafe_allow_html=True)
|
| 194 |
+
|
| 195 |
+
st.markdown("""
|
| 196 |
+
<h5 style="text-align: center; margin-top: 20px;">
|
| 197 |
+
Exploratory Data Analysis (EDA) helps in understanding the structure, patterns, and missing values in the dataset.
|
| 198 |
+
Below is an initial preview of the data, followed by a missing values summary.
|
| 199 |
+
</h5>
|
| 200 |
+
""", unsafe_allow_html=True)
|
| 201 |
+
|
| 202 |
+
st.markdown("<br>", unsafe_allow_html=True)
|
| 203 |
+
|
| 204 |
+
# Display dataset sample
|
| 205 |
+
st.markdown("<h3 class='subtitle' style='text-align: center;'>Sample Dataset</h3>", unsafe_allow_html=True)
|
| 206 |
+
st.dataframe(data.head())
|
| 207 |
+
|
| 208 |
+
st.markdown("<br>", unsafe_allow_html=True)
|
| 209 |
+
|
| 210 |
+
# Display missing values count
|
| 211 |
+
st.markdown("<h3 class='subtitle' style='text-align: center;'>Missing Values Summary</h3>", unsafe_allow_html=True)
|
| 212 |
+
|
| 213 |
+
missing_values = data.isna().sum().reset_index()
|
| 214 |
+
missing_values.columns = ["Column Name", "Missing Values"]
|
| 215 |
|
| 216 |
+
st.dataframe(missing_values)
|
| 217 |
+
|
| 218 |
+
st.markdown("<br>", unsafe_allow_html=True)
|
| 219 |
+
|
| 220 |
+
|
| 221 |
+
if st.button("๐ Go Back to Model Report"):
|
| 222 |
+
switch_page("Model Report")
|
| 223 |
|
| 224 |
# Hands-on Model Page
|
| 225 |
elif st.session_state.current_page == "Hands-on Model":
|