Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -47,23 +47,40 @@ st.markdown("""
|
|
| 47 |
|
| 48 |
|
| 49 |
import streamlit as st
|
|
|
|
| 50 |
|
| 51 |
-
# Function to
|
| 52 |
-
def centered_step(label, step_number, is_last=False):
|
| 53 |
# Display the step button
|
| 54 |
-
col1, col2, col3 = st.columns([1,
|
| 55 |
with col2:
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
# Display the arrow between steps
|
| 60 |
if not is_last:
|
| 61 |
-
col1, col2, col3 = st.columns([1,
|
| 62 |
with col2:
|
| 63 |
st.markdown(
|
| 64 |
"""
|
| 65 |
<div style="text-align: center; margin: -20px;">
|
| 66 |
-
<span style="font-size:
|
| 67 |
</div>
|
| 68 |
""",
|
| 69 |
unsafe_allow_html=True,
|
|
@@ -71,19 +88,19 @@ def centered_step(label, step_number, is_last=False):
|
|
| 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()
|
|
@@ -110,4 +127,3 @@ if "page" in query_params:
|
|
| 110 |
st.write("This is the **Deployment** page.")
|
| 111 |
elif page == "step10":
|
| 112 |
st.write("This is the **Monitoring** page.")
|
| 113 |
-
|
|
|
|
| 47 |
|
| 48 |
|
| 49 |
import streamlit as st
|
| 50 |
+
from streamlit.components.v1 import html
|
| 51 |
|
| 52 |
+
# Function to create a centered step with color and arrow
|
| 53 |
+
def centered_step(label, step_number, color, is_last=False):
|
| 54 |
# Display the step button
|
| 55 |
+
col1, col2, col3 = st.columns([1, 3, 1]) # Center the layout
|
| 56 |
with col2:
|
| 57 |
+
button_html = f"""
|
| 58 |
+
<div style="text-align: center;">
|
| 59 |
+
<a href="?page=step{step_number}" style="
|
| 60 |
+
display: inline-block;
|
| 61 |
+
background-color: {color};
|
| 62 |
+
color: white;
|
| 63 |
+
padding: 10px 20px;
|
| 64 |
+
text-decoration: none;
|
| 65 |
+
font-size: 18px;
|
| 66 |
+
font-weight: bold;
|
| 67 |
+
border-radius: 8px;
|
| 68 |
+
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
|
| 69 |
+
">
|
| 70 |
+
{label}
|
| 71 |
+
</a>
|
| 72 |
+
</div>
|
| 73 |
+
"""
|
| 74 |
+
html(button_html, height=50)
|
| 75 |
|
| 76 |
# Display the arrow between steps
|
| 77 |
if not is_last:
|
| 78 |
+
col1, col2, col3 = st.columns([1, 3, 1])
|
| 79 |
with col2:
|
| 80 |
st.markdown(
|
| 81 |
"""
|
| 82 |
<div style="text-align: center; margin: -20px;">
|
| 83 |
+
<span style="font-size: 40px; color: green;">✓</span>
|
| 84 |
</div>
|
| 85 |
""",
|
| 86 |
unsafe_allow_html=True,
|
|
|
|
| 88 |
|
| 89 |
# Title
|
| 90 |
st.title("Machine Learning Workflow")
|
| 91 |
+
st.write("Click on a step to navigate to its page.")
|
| 92 |
|
| 93 |
# Display centered steps with arrows
|
| 94 |
+
centered_step("Problem Statement", 1, "#4A90E2")
|
| 95 |
+
centered_step("Data Collection", 2, "#F25C54")
|
| 96 |
+
centered_step("Simple EDA", 3, "#F7C948")
|
| 97 |
+
centered_step("Data Pre-processing", 4, "#00B159")
|
| 98 |
+
centered_step("EDA", 5, "#D76AC3")
|
| 99 |
+
centered_step("Feature Engineering", 6, "#6A4C93")
|
| 100 |
+
centered_step("Model Building", 7, "#F25C54")
|
| 101 |
+
centered_step("Evaluation", 8, "#4A90E2")
|
| 102 |
+
centered_step("Deployment", 9, "#00B159")
|
| 103 |
+
centered_step("Monitoring", 10, "#D76AC3", is_last=True)
|
| 104 |
|
| 105 |
# Handle redirection based on query parameters
|
| 106 |
query_params = st.experimental_get_query_params()
|
|
|
|
| 127 |
st.write("This is the **Deployment** page.")
|
| 128 |
elif page == "step10":
|
| 129 |
st.write("This is the **Monitoring** page.")
|
|
|