Update pages/4.Life Cycle of ML.py
Browse files- pages/4.Life Cycle of ML.py +21 -30
pages/4.Life Cycle of ML.py
CHANGED
@@ -1,36 +1,29 @@
|
|
1 |
-
|
2 |
import streamlit as st
|
3 |
import os
|
4 |
|
5 |
# Sidebar for navigation
|
6 |
st.sidebar.title("Navigation")
|
7 |
-
pages = st.sidebar.radio(
|
|
|
|
|
|
|
|
|
|
|
8 |
|
|
|
|
|
9 |
|
10 |
if pages == "Life Cycle of ML":
|
11 |
st.title("Life Cycle of Machine Learning")
|
12 |
st.write("Explore the steps involved in the Machine Learning lifecycle.")
|
13 |
-
if st.button("Problem Satement"):
|
14 |
-
st.experimental_set_query_params(pages="Problem_Satement")
|
15 |
-
if st.button("Data Collection"):
|
16 |
-
st.experimental_set_query_params(pages="data_collection")
|
17 |
-
if st.button("Simple EDA"):
|
18 |
-
st.experimental_set_query_params(pages="Simple_EDA")
|
19 |
-
if st.button("Data Pre-processing"):
|
20 |
-
st.experimental_set_query_params(pages="Data_Pre-processing")
|
21 |
-
if st.button("Exploratory Data Analysis (EDA)"):
|
22 |
-
st.experimental_set_query_params(pages="Exploratory_Data_Analysis_(EDA)")
|
23 |
-
if st.button("Feature Engineering"):
|
24 |
-
st.experimental_set_query_params(pages="Feature_Engineering")
|
25 |
-
if st.button("Training"):
|
26 |
-
st.experimental_set_query_params(pages="Training")
|
27 |
-
if st.button("Testing"):
|
28 |
-
st.experimental_set_query_params(pages="Testing")
|
29 |
-
if st.button("Deployment"):
|
30 |
-
st.experimental_set_query_params(pages="Deployment")
|
31 |
-
if st.button("Monitoring"):
|
32 |
-
st.experimental_set_query_params(pages="Monitoring")
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
elif pages == "Data Collection":
|
36 |
st.title("Data Collection")
|
@@ -42,10 +35,8 @@ elif pages == "Data Collection":
|
|
42 |
st.write("### Structured Data Formats:")
|
43 |
format_selected = st.radio("Choose a data format:", ["Excel", "CSV", "SQL Database"])
|
44 |
if format_selected == "Excel":
|
45 |
-
st.experimental_set_query_params(
|
46 |
|
47 |
-
# Handling query parameters for structured data navigation
|
48 |
-
query_params = st.experimental_get_query_params()
|
49 |
if query_params.get("pages", [None])[0] == "structured_excel":
|
50 |
st.title("Excel Data Format")
|
51 |
st.write("#### What is Excel?")
|
@@ -75,15 +66,15 @@ if query_params.get("pages", [None])[0] == "structured_excel":
|
|
75 |
- Convert to a supported format if needed.
|
76 |
""")
|
77 |
|
78 |
-
# Button to download a Jupyter Notebook or PDF
|
79 |
st.markdown("### Download Coding Guide:")
|
80 |
-
|
81 |
-
|
82 |
-
file_path = "Excel_guide.ipynb" # Ensure this file exists in the app directory
|
83 |
with open(file_path, "rb") as file:
|
84 |
st.download_button(
|
85 |
label="Download Excel Guide",
|
86 |
data=file,
|
87 |
file_name="Excel_guide.ipynb",
|
88 |
mime="application/octet-stream",
|
89 |
-
)
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
import os
|
3 |
|
4 |
# Sidebar for navigation
|
5 |
st.sidebar.title("Navigation")
|
6 |
+
pages = st.sidebar.radio(
|
7 |
+
"Go to:",
|
8 |
+
["Life Cycle of ML", "Problem Statement", "Data Collection",
|
9 |
+
"Simple EDA", "Data Pre-processing", "Exploratory Data Analysis (EDA)",
|
10 |
+
"Feature Engineering", "Training", "Testing", "Deployment", "Monitoring"]
|
11 |
+
)
|
12 |
|
13 |
+
# Main Navigation Logic
|
14 |
+
query_params = st.experimental_get_query_params()
|
15 |
|
16 |
if pages == "Life Cycle of ML":
|
17 |
st.title("Life Cycle of Machine Learning")
|
18 |
st.write("Explore the steps involved in the Machine Learning lifecycle.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
for button_name in [
|
21 |
+
"Problem Statement", "Data Collection", "Simple EDA",
|
22 |
+
"Data Pre-processing", "Exploratory Data Analysis (EDA)",
|
23 |
+
"Feature Engineering", "Training", "Testing", "Deployment", "Monitoring"
|
24 |
+
]:
|
25 |
+
if st.button(button_name):
|
26 |
+
st.experimental_set_query_params(pages=button_name.replace(" ", "_"))
|
27 |
|
28 |
elif pages == "Data Collection":
|
29 |
st.title("Data Collection")
|
|
|
35 |
st.write("### Structured Data Formats:")
|
36 |
format_selected = st.radio("Choose a data format:", ["Excel", "CSV", "SQL Database"])
|
37 |
if format_selected == "Excel":
|
38 |
+
st.experimental_set_query_params(pages="structured_excel")
|
39 |
|
|
|
|
|
40 |
if query_params.get("pages", [None])[0] == "structured_excel":
|
41 |
st.title("Excel Data Format")
|
42 |
st.write("#### What is Excel?")
|
|
|
66 |
- Convert to a supported format if needed.
|
67 |
""")
|
68 |
|
|
|
69 |
st.markdown("### Download Coding Guide:")
|
70 |
+
file_path = "Excel_guide.ipynb"
|
71 |
+
if os.path.exists(file_path):
|
|
|
72 |
with open(file_path, "rb") as file:
|
73 |
st.download_button(
|
74 |
label="Download Excel Guide",
|
75 |
data=file,
|
76 |
file_name="Excel_guide.ipynb",
|
77 |
mime="application/octet-stream",
|
78 |
+
)
|
79 |
+
else:
|
80 |
+
st.error("The file 'Excel_guide.ipynb' does not exist. Please add it to the application directory.")
|