Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -48,43 +48,45 @@ st.markdown("""
|
|
| 48 |
|
| 49 |
import streamlit as st
|
| 50 |
|
| 51 |
-
#
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
st.experimental_set_query_params(page=f"step{step_number}")
|
| 59 |
|
| 60 |
-
#
|
| 61 |
if not is_last:
|
| 62 |
-
st.
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
|
|
|
| 70 |
|
| 71 |
-
#
|
| 72 |
st.title("Machine Learning Workflow")
|
| 73 |
st.write("Click a step to navigate to its page.")
|
| 74 |
|
| 75 |
-
# Display
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
|
| 87 |
-
#
|
|
|
|
| 88 |
if "page" in query_params:
|
| 89 |
page = query_params["page"][0]
|
| 90 |
st.write(f"Redirecting to {page} page...")
|
|
@@ -108,3 +110,4 @@ if "page" in query_params:
|
|
| 108 |
st.write("This is the **Deployment** page.")
|
| 109 |
elif page == "step10":
|
| 110 |
st.write("This is the **Monitoring** page.")
|
|
|
|
|
|
| 48 |
|
| 49 |
import streamlit as st
|
| 50 |
|
| 51 |
+
# Function to display a centered step with an arrow
|
| 52 |
+
def centered_step(label, step_number, is_last=False):
|
| 53 |
+
# Display the step button
|
| 54 |
+
col1, col2, col3 = st.columns([1, 2, 1]) # Centered layout
|
| 55 |
+
with col2:
|
| 56 |
+
if st.button(label, key=f"step_{step_number}"):
|
| 57 |
+
st.experimental_set_query_params(page=f"step{step_number}")
|
|
|
|
| 58 |
|
| 59 |
+
# Display the arrow between steps
|
| 60 |
if not is_last:
|
| 61 |
+
col1, col2, col3 = st.columns([1, 2, 1])
|
| 62 |
+
with col2:
|
| 63 |
+
st.markdown(
|
| 64 |
+
"""
|
| 65 |
+
<div style="text-align: center; margin: -20px;">
|
| 66 |
+
<span style="font-size: 30px; color: blue;">⬇️</span>
|
| 67 |
+
</div>
|
| 68 |
+
""",
|
| 69 |
+
unsafe_allow_html=True,
|
| 70 |
+
)
|
| 71 |
|
| 72 |
+
# Title
|
| 73 |
st.title("Machine Learning Workflow")
|
| 74 |
st.write("Click a step to navigate to its page.")
|
| 75 |
|
| 76 |
+
# Display centered steps with arrows
|
| 77 |
+
centered_step("Problem Statement", 1)
|
| 78 |
+
centered_step("Data Collection", 2)
|
| 79 |
+
centered_step("Simple EDA", 3)
|
| 80 |
+
centered_step("Data Pre-processing", 4)
|
| 81 |
+
centered_step("EDA", 5)
|
| 82 |
+
centered_step("Feature Engineering", 6)
|
| 83 |
+
centered_step("Model Building", 7)
|
| 84 |
+
centered_step("Evaluation", 8)
|
| 85 |
+
centered_step("Deployment", 9)
|
| 86 |
+
centered_step("Monitoring", 10, is_last=True)
|
| 87 |
|
| 88 |
+
# Handle redirection based on query parameters
|
| 89 |
+
query_params = st.experimental_get_query_params()
|
| 90 |
if "page" in query_params:
|
| 91 |
page = query_params["page"][0]
|
| 92 |
st.write(f"Redirecting to {page} page...")
|
|
|
|
| 110 |
st.write("This is the **Deployment** page.")
|
| 111 |
elif page == "step10":
|
| 112 |
st.write("This is the **Monitoring** page.")
|
| 113 |
+
|