LakshmiHarika commited on
Commit
0a5bc86
·
verified ·
1 Parent(s): deea9b3

Update pages/3Life Cycle of Machine Learning Project.py

Browse files
pages/3Life Cycle of Machine Learning Project.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
 
 
3
  st.set_page_config(
4
  page_title="HomePage",
5
  page_icon="🚀",
@@ -25,6 +26,7 @@ st.markdown("""
25
  </style>
26
  """, unsafe_allow_html=True)
27
 
 
28
  st.markdown(
29
  """
30
  <style>
@@ -42,7 +44,7 @@ st.markdown(
42
  # Title of the page
43
  st.markdown("""<div style="text-align: left; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
44
 
45
- # Circle Representation HTML and CSS (properly rendered)
46
  html_code = """
47
  <!DOCTYPE html>
48
  <html lang="en">
@@ -99,90 +101,20 @@ html_code = """
99
  transform-origin: 50% 50%;
100
  transition: transform 0.5s ease-in-out;
101
  }
102
-
103
  .step:hover {
104
  background-color: #0056b3;
105
- }
106
- /* Different background colors for each step */
107
- #step1 {
108
- background-color: #FFCCCC;
109
- transform: rotate(0deg) translateX(140px) rotate(0deg);
110
- }
111
- #step2 {
112
- background-color: #FFDD99;
113
- transform: rotate(36deg) translateX(140px) rotate(-36deg);
114
- }
115
- #step3 {
116
- background-color: #FFFF99;
117
- transform: rotate(72deg) translateX(140px) rotate(-72deg);
118
- }
119
- #step4 {
120
- background-color: #CCFFCC;
121
- transform: rotate(108deg) translateX(140px) rotate(-108deg);
122
- }
123
- #step5 {
124
- background-color: #CCE5FF;
125
- transform: rotate(144deg) translateX(140px) rotate(-144deg);
126
- }
127
- #step6 {
128
- background-color: #E5CCFF;
129
- transform: rotate(180deg) translateX(140px) rotate(-180deg);
130
- }
131
- #step7 {
132
- background-color: #FFD9E6;
133
- transform: rotate(216deg) translateX(140px) rotate(-216deg);
134
- }
135
- #step8 {
136
- background-color: #FFF5CC;
137
- transform: rotate(252deg) translateX(140px) rotate(-252deg);
138
- }
139
- #step9 {
140
- background-color: #D9FFF5;
141
- transform: rotate(288deg) translateX(140px) rotate(-288deg);
142
- }
143
- #step10 {
144
- background-color: #D9CCFF;
145
- transform: rotate(324deg) translateX(140px) rotate(-324deg);
146
  }
147
  /* Rotate steps to form a circular layout */
148
- #step4 {
149
- transform: rotate(0deg) translateX(250px) rotate(0deg);
150
- }
151
- #step5 {
152
- transform: rotate(25deg) translateX(250px) rotate(-25deg);
153
- }
154
- #step6 {
155
- transform: rotate(60deg) translateX(250px) rotate(-60deg);
156
- }
157
- #step7 {
158
- transform: rotate(120deg) translateX(250px) rotate(-120deg);
159
- }
160
- #step8 {
161
- transform: rotate(155deg) translateX(250px) rotate(-155deg);
162
- }
163
- #step9 {
164
- transform: rotate(180deg) translateX(250px) rotate(-180deg);
165
- }
166
- #step10 {
167
- transform: rotate(205deg) translateX(250px) rotate(-205deg);
168
- }
169
- #step1 {
170
- transform: rotate(240deg) translateX(250px) rotate(-240deg);
171
- }
172
- #step2 {
173
- transform: rotate(300deg) translateX(250px) rotate(-300deg);
174
- }
175
- #step3 {
176
- transform: rotate(335deg) translateX(250px) rotate(-335deg);
177
- }
178
- a {
179
- color: white; /* Link color */
180
- text-decoration: none;
181
- }
182
- a:hover {
183
- color: yellow; /* Color on hover */
184
- text-decoration: underline; /* Underline on hover */
185
- }
186
  </style>
187
  </head>
188
  <body>
@@ -190,16 +122,16 @@ html_code = """
190
  <h1></h1>
191
  <div class="circle">
192
  <div class="steps">
193
- <div class="step" id="step2">1. Problem Statement</div>
194
- <div class="step" id="step3">2. Data Collection</div>
195
- <div class="step" id="step4">3. Simple EDA</div>
196
- <div class="step" id="step5">4. Data Pre-Processing</div>
197
- <div class="step" id="step6">5. EDA</div>
198
- <div class="step" id="step7">6. Feature Engineering</div>
199
- <div class="step" id="step8">7. Training the Model</div>
200
- <div class="step" id="step9">8. Testing the Model</div>
201
- <div class="step" id="step10">9. Model Deployment</div>
202
- <div class="step" id="step1">10. Monitoring</div>
203
  </div>
204
  </div>
205
  </div>
@@ -207,11 +139,14 @@ html_code = """
207
  </html>
208
  """
209
 
210
- # Streamlit: Display the HTML circle with properly spaced steps
211
  st.markdown(html_code, unsafe_allow_html=True)
212
- st.write(' ')
213
- st.write(' ')
214
- st.write(' ')
215
- st.write(' ')
216
- st.write(' ')
217
- st.write(' ')
 
 
 
 
1
  import streamlit as st
2
 
3
+ # Set up the page config
4
  st.set_page_config(
5
  page_title="HomePage",
6
  page_icon="🚀",
 
26
  </style>
27
  """, unsafe_allow_html=True)
28
 
29
+ # Set background and page title
30
  st.markdown(
31
  """
32
  <style>
 
44
  # Title of the page
45
  st.markdown("""<div style="text-align: left; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
46
 
47
+ # Circle Representation HTML and CSS with buttons for redirection
48
  html_code = """
49
  <!DOCTYPE html>
50
  <html lang="en">
 
101
  transform-origin: 50% 50%;
102
  transition: transform 0.5s ease-in-out;
103
  }
 
104
  .step:hover {
105
  background-color: #0056b3;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  }
107
  /* Rotate steps to form a circular layout */
108
+ #step1 { transform: rotate(0deg) translateX(140px) rotate(0deg); }
109
+ #step2 { transform: rotate(36deg) translateX(140px) rotate(-36deg); }
110
+ #step3 { transform: rotate(72deg) translateX(140px) rotate(-72deg); }
111
+ #step4 { transform: rotate(108deg) translateX(140px) rotate(-108deg); }
112
+ #step5 { transform: rotate(144deg) translateX(140px) rotate(-144deg); }
113
+ #step6 { transform: rotate(180deg) translateX(140px) rotate(-180deg); }
114
+ #step7 { transform: rotate(216deg) translateX(140px) rotate(-216deg); }
115
+ #step8 { transform: rotate(252deg) translateX(140px) rotate(-252deg); }
116
+ #step9 { transform: rotate(288deg) translateX(140px) rotate(-288deg); }
117
+ #step10 { transform: rotate(324deg) translateX(140px) rotate(-324deg); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  </style>
119
  </head>
120
  <body>
 
122
  <h1></h1>
123
  <div class="circle">
124
  <div class="steps">
125
+ <div class="step" id="step2" onclick="window.location.href='/?page=ProblemStatement'">1. Problem Statement</div>
126
+ <div class="step" id="step3" onclick="window.location.href='/?page=DataCollection'">2. Data Collection</div>
127
+ <div class="step" id="step4" onclick="window.location.href='/?page=SimpleEDA'">3. Simple EDA</div>
128
+ <div class="step" id="step5" onclick="window.location.href='/?page=DataPreprocessing'">4. Data Pre-Processing</div>
129
+ <div class="step" id="step6" onclick="window.location.href='/?page=EDA'">5. EDA</div>
130
+ <div class="step" id="step7" onclick="window.location.href='/?page=FeatureEngineering'">6. Feature Engineering</div>
131
+ <div class="step" id="step8" onclick="window.location.href='/?page=ModelTraining'">7. Training the Model</div>
132
+ <div class="step" id="step9" onclick="window.location.href='/?page=ModelTesting'">8. Testing the Model</div>
133
+ <div class="step" id="step10" onclick="window.location.href='/?page=ModelDeployment'">9. Model Deployment</div>
134
+ <div class="step" id="step1" onclick="window.location.href='/?page=Monitoring'">10. Monitoring</div>
135
  </div>
136
  </div>
137
  </div>
 
139
  </html>
140
  """
141
 
142
+ # Display the circle
143
  st.markdown(html_code, unsafe_allow_html=True)
144
+
145
+ # Simulate page content change based on the query parameter
146
+ query_params = st.experimental_get_query_params()
147
+
148
+ if 'page' in query_params:
149
+ page = query_params['page'][0]
150
+ st.write(f"Redirecting to {page} page...")
151
+ else:
152
+ st.write("Welcome to the Home page!")