Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -45,22 +45,20 @@ st.markdown("""
|
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 46 |
|
| 47 |
|
| 48 |
-
|
| 49 |
import streamlit as st
|
| 50 |
from streamlit.components.v1 import html
|
| 51 |
|
| 52 |
-
# Function to create a centered step with
|
| 53 |
-
def centered_step(label,
|
| 54 |
-
|
| 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="
|
| 60 |
display: inline-block;
|
| 61 |
-
background-color
|
| 62 |
color: white;
|
| 63 |
-
padding:
|
| 64 |
text-decoration: none;
|
| 65 |
font-size: 18px;
|
| 66 |
font-weight: bold;
|
|
@@ -79,8 +77,8 @@ def centered_step(label, step_number, color, is_last=False):
|
|
| 79 |
with col2:
|
| 80 |
st.markdown(
|
| 81 |
"""
|
| 82 |
-
<div style="text-align: center; margin: -
|
| 83 |
-
<span style="font-size: 40px; color: green;">
|
| 84 |
</div>
|
| 85 |
""",
|
| 86 |
unsafe_allow_html=True,
|
|
@@ -88,42 +86,16 @@ def centered_step(label, step_number, color, is_last=False):
|
|
| 88 |
|
| 89 |
# Title
|
| 90 |
st.title("Machine Learning Workflow")
|
| 91 |
-
st.write("Click
|
| 92 |
|
| 93 |
# Display centered steps with arrows
|
| 94 |
-
centered_step("Problem Statement",
|
| 95 |
-
centered_step("Data Collection",
|
| 96 |
-
centered_step("Simple EDA",
|
| 97 |
-
centered_step("Data Pre-processing",
|
| 98 |
-
centered_step("EDA",
|
| 99 |
-
centered_step("Feature Engineering",
|
| 100 |
-
centered_step("Model Building",
|
| 101 |
-
centered_step("Evaluation",
|
| 102 |
-
centered_step("Deployment",
|
| 103 |
-
centered_step("Monitoring",
|
| 104 |
-
|
| 105 |
-
# Handle redirection based on query parameters
|
| 106 |
-
query_params = st.experimental_get_query_params()
|
| 107 |
-
if "page" in query_params:
|
| 108 |
-
page = query_params["page"][0]
|
| 109 |
-
st.write(f"Redirecting to {page} page...")
|
| 110 |
-
if page == "step1":
|
| 111 |
-
st.write("This is the **Problem Statement** page.")
|
| 112 |
-
elif page == "step2":
|
| 113 |
-
st.write("This is the **Data Collection** page.")
|
| 114 |
-
elif page == "step3":
|
| 115 |
-
st.write("This is the **Simple EDA** page.")
|
| 116 |
-
elif page == "step4":
|
| 117 |
-
st.write("This is the **Data Pre-processing** page.")
|
| 118 |
-
elif page == "step5":
|
| 119 |
-
st.write("This is the **EDA** page.")
|
| 120 |
-
elif page == "step6":
|
| 121 |
-
st.write("This is the **Feature Engineering** page.")
|
| 122 |
-
elif page == "step7":
|
| 123 |
-
st.write("This is the **Model Building** page.")
|
| 124 |
-
elif page == "step8":
|
| 125 |
-
st.write("This is the **Evaluation** page.")
|
| 126 |
-
elif page == "step9":
|
| 127 |
-
st.write("This is the **Deployment** page.")
|
| 128 |
-
elif page == "step10":
|
| 129 |
-
st.write("This is the **Monitoring** page.")
|
|
|
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 46 |
|
| 47 |
|
|
|
|
| 48 |
import streamlit as st
|
| 49 |
from streamlit.components.v1 import html
|
| 50 |
|
| 51 |
+
# Function to create a centered step with a rectangle and direct page navigation
|
| 52 |
+
def centered_step(label, page, color, is_last=False):
|
| 53 |
+
col1, col2, col3 = st.columns([1, 3, 1]) # Center layout
|
|
|
|
| 54 |
with col2:
|
| 55 |
button_html = f"""
|
| 56 |
<div style="text-align: center;">
|
| 57 |
+
<a href="{page}" target="_self" style="
|
| 58 |
display: inline-block;
|
| 59 |
+
background: linear-gradient(to right, {color[0]}, {color[1]});
|
| 60 |
color: white;
|
| 61 |
+
padding: 15px 20px;
|
| 62 |
text-decoration: none;
|
| 63 |
font-size: 18px;
|
| 64 |
font-weight: bold;
|
|
|
|
| 77 |
with col2:
|
| 78 |
st.markdown(
|
| 79 |
"""
|
| 80 |
+
<div style="text-align: center; margin: -10px;">
|
| 81 |
+
<span style="font-size: 40px; color: green;">⬇️</span>
|
| 82 |
</div>
|
| 83 |
""",
|
| 84 |
unsafe_allow_html=True,
|
|
|
|
| 86 |
|
| 87 |
# Title
|
| 88 |
st.title("Machine Learning Workflow")
|
| 89 |
+
st.write("Click a step to navigate to its page.")
|
| 90 |
|
| 91 |
# Display centered steps with arrows
|
| 92 |
+
centered_step("Problem Statement", "/page1", ["#4A90E2", "#0056B3"]) # Blue gradient
|
| 93 |
+
centered_step("Data Collection", "/page2", ["#F25C54", "#FF5733"]) # Red gradient
|
| 94 |
+
centered_step("Simple EDA", "/page3", ["#F7C948", "#FFC300"]) # Yellow gradient
|
| 95 |
+
centered_step("Data Pre-processing", "/page4", ["#00B159", "#009688"]) # Green gradient
|
| 96 |
+
centered_step("EDA", "/page5", ["#D76AC3", "#C70039"]) # Pink gradient
|
| 97 |
+
centered_step("Feature Engineering", "/page6", ["#6A4C93", "#5D3FD3"]) # Purple gradient
|
| 98 |
+
centered_step("Model Building", "/page7", ["#F25C54", "#E53935"]) # Another red gradient
|
| 99 |
+
centered_step("Evaluation", "/page8", ["#4A90E2", "#1565C0"]) # Another blue gradient
|
| 100 |
+
centered_step("Deployment", "/page9", ["#00B159", "#43A047"]) # Another green gradient
|
| 101 |
+
centered_step("Monitoring", "/page10", ["#D76AC3", "#8E24AA"], is_last=True) # Another purple gradient
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|