LakshmiHarika commited on
Commit
0d9d13d
·
verified ·
1 Parent(s): 3cc8250

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
- # Set up the query parameters for redirection
52
- query_params = st.experimental_get_query_params()
53
-
54
- # Function to display a step with a button and arrow
55
- def display_step(label, step_number, color, is_last=False):
56
- # Button for the step
57
- if st.button(label, key=f"step_{step_number}"):
58
- st.experimental_set_query_params(page=f"step{step_number}")
59
 
60
- # Arrow between steps
61
  if not is_last:
62
- st.markdown(
63
- """
64
- <div style="text-align: center; margin: -10px;">
65
- <span style="font-size: 30px; color: green;">⬇️</span>
66
- </div>
67
- """,
68
- unsafe_allow_html=True,
69
- )
 
 
70
 
71
- # Main Layout
72
  st.title("Machine Learning Workflow")
73
  st.write("Click a step to navigate to its page.")
74
 
75
- # Display Steps
76
- display_step("Problem Statement", 1, "#4A90E2")
77
- display_step("Data Collection", 2, "#F25C54")
78
- display_step("Simple EDA", 3, "#F7C948")
79
- display_step("Data Pre-processing", 4, "#00B159")
80
- display_step("EDA", 5, "#D76AC3")
81
- display_step("Feature Engineering", 6, "#6A4C93")
82
- display_step("Model Building", 7, "#F25C54")
83
- display_step("Evaluation", 8, "#4A90E2")
84
- display_step("Deployment", 9, "#00B159")
85
- display_step("Monitoring", 10, "#D76AC3")
86
 
87
- # Redirect to a specific step page
 
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
+