LakshmiHarika commited on
Commit
6a4114d
·
verified ·
1 Parent(s): 6801e1f

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

Browse files
pages/3Life Cycle of Machine Learning Project.py CHANGED
@@ -11,14 +11,14 @@ st.set_page_config(
11
  st.markdown("""
12
  <style>
13
  body, .stApp {
14
- color: #4F4F4F; /* Replace with your desired font color */
15
- background-color: #FFFFFF; /* Optional: Set a fixed background color */
16
  }
17
  h1, h2, h3, h4, h5, h6 {
18
- color: #BB3385; /* Replace with your heading color */
19
  }
20
  p {
21
- color: #4F4F4F; /* Replace with your paragraph text color */
22
  }
23
  ul li {
24
  color: #4F4F4F; /* List item color */
@@ -26,183 +26,111 @@ st.markdown("""
26
  </style>
27
  """, unsafe_allow_html=True)
28
 
29
- st.markdown(
30
- """
31
- <style>
32
- .stApp {
33
- background-image: url("https://huggingface.co/spaces/LakshmiHarika/MachineLearning/resolve/main/DALL%C2%B7E%202024-12-03%2023.34.47%20-%20A%20simple%20and%20elegant%20background%20image%20for%20an%20AI-themed%20web%20application.%20The%20background%20should%20feature%20a%20soft%20gradient%20transitioning%20from%20white%20to%20ligh.webp");
34
- background-size: cover;
35
- background-repeat: no-repeat;
36
- background-attachment: fixed;
37
- }
38
- </style>
39
- """, unsafe_allow_html=True
40
- )
41
-
42
  # Title of the page
43
  st.markdown("""<div style="text-align: center; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
44
 
45
- # Inject custom CSS for the vertical flowchart
46
  st.markdown(
47
  """
48
  <style>
49
- .vertical-flowchart {
50
- position: relative;
51
- width: 400px; /* Layout width */
52
- margin: 0 auto;
53
  display: flex;
54
  flex-direction: column;
55
  align-items: center;
 
 
56
  }
 
57
  /* Styling for each phase (rectangle button) */
58
  .phase {
59
- position: relative;
60
  width: 300px; /* Rectangle width */
61
  height: 60px; /* Rectangle height */
62
- border: none; /* Remove border */
63
  border-radius: 8px; /* Rounded edges */
64
  font-size: 16px; /* Text size */
65
  font-weight: bold;
66
  text-align: center;
67
  cursor: pointer;
68
- margin-bottom: 10px; /* Space between steps */
69
- font-family: Arial, sans-serif;
70
  display: flex;
71
  justify-content: center;
72
  align-items: center;
73
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
74
  transition: transform 0.3s ease, background-color 0.3s ease;
75
- color: black; /* Always black text */
76
  }
 
77
  /* Colors for each phase */
78
- .phase-1 { background-color: #E6F4EA; } /* Light Green */
79
- .phase-2 { background-color: #E0F7FA; } /* Light Blue */
80
- .phase-3 { background-color: #FFF9C4; } /* Light Yellow */
81
- .phase-4 { background-color: #FFE0B2; } /* Light Orange */
82
- .phase-5 { background-color: #DCEDC8; } /* Light Green */
83
- .phase-6 { background-color: #D1C4E9; } /* Light Purple */
84
- .phase-7 { background-color: #F8BBD0; } /* Light Pink */
85
- .phase-8 { background-color: #CFD8DC; } /* Light Gray-Blue */
86
- .phase-9 { background-color: #B2EBF2; } /* Light Cyan */
87
- .phase-10 { background-color: #FFE082; } /* Light Amber */
 
88
  .phase:hover {
89
  transform: scale(1.05);
90
  background-color: #F0F0F0; /* Slightly lighter on hover */
91
- color: black; /* Ensure text remains black */
92
  }
93
- /* Arrow styling */
94
  .arrow {
95
- font-size: 24px; /* Arrow size */
96
- color: #4F4F4F; /* Dark arrow color */
97
- margin: 10px 0; /* Space for arrow */
 
 
 
 
 
98
  }
99
  </style>
100
  """, unsafe_allow_html=True
101
  )
102
 
103
- # HTML structure for the vertical flowchart with descriptions using Streamlit's expander
104
  st.markdown(
105
  """
106
- <div class="vertical-flowchart">
107
  <!-- Problem Statement -->
108
- <a href="/problem-statement" class="phase phase-1" target="_self">Problem Statement</a>
109
  <div class="arrow">⬇️</div>
110
- <div>
111
- <details>
112
- <summary>Click to View Description</summary>
113
- Clearly define the issue, the data used, and the expected outcome.
114
- </details>
115
- </div>
116
 
117
  <!-- Data Collection -->
118
- <a href="/data-collection" class="phase phase-2" target="_self">Data Collection</a>
119
  <div class="arrow">⬇️</div>
120
- <div>
121
- <details>
122
- <summary>Click to View Description</summary>
123
- Collect relevant data from multiple sources, ensuring it aligns with the problem statement.
124
- </details>
125
- </div>
126
 
127
  <!-- Simple EDA -->
128
- <a href="/simple-eda" class="phase phase-3" target="_self">Simple EDA</a>
129
  <div class="arrow">⬇️</div>
130
- <div>
131
- <details>
132
- <summary>Click to View Description</summary>
133
- Perform initial exploratory analysis to assess data quality, structure, and appearance.
134
- </details>
135
- </div>
136
 
137
  <!-- Data Preprocessing -->
138
- <a href="/data-preprocessing" class="phase phase-4" target="_self">Data Preprocessing</a>
139
  <div class="arrow">⬇️</div>
140
- <div>
141
- <details>
142
- <summary>Click to View Description</summary>
143
- Clean the dataset by handling missing values, outliers, and inconsistencies, transforming it into a suitable format.
144
- </details>
145
- </div>
146
 
147
  <!-- EDA -->
148
- <a href="/eda" class="phase phase-5" target="_self">EDA</a>
149
  <div class="arrow">⬇️</div>
150
- <div>
151
- <details>
152
- <summary>Click to View Description</summary>
153
- Perform detailed analysis to uncover trends, patterns, and relationships that will guide model building.
154
- </details>
155
- </div>
156
 
157
  <!-- Feature Engineering -->
158
- <a href="/feature-engineering" class="phase phase-6" target="_self">Feature Engineering</a>
159
  <div class="arrow">⬇️</div>
160
- <div>
161
- <details>
162
- <summary>Click to View Description</summary>
163
- Create or select meaningful features, scale variables, and reduce dimensionality to enhance model performance.
164
- </details>
165
- </div>
166
 
167
  <!-- Model Training -->
168
- <a href="/model-training" class="phase phase-7" target="_self">Model Training</a>
169
  <div class="arrow">⬇️</div>
170
- <div>
171
- <details>
172
- <summary>Click to View Description</summary>
173
- Train machine learning models on the prepared data and optimize parameters for improved performance.
174
- </details>
175
- </div>
176
 
177
  <!-- Model Testing -->
178
- <a href="/model-testing" class="phase phase-8" target="_self">Model Testing</a>
179
  <div class="arrow">⬇️</div>
180
- <div>
181
- <details>
182
- <summary>Click to View Description</summary>
183
- Evaluate the trained model on a validation or test dataset to assess accuracy, precision, and other metrics.
184
- </details>
185
- </div>
186
 
187
  <!-- Deployment -->
188
- <a href="/deployment" class="phase phase-9" target="_self">Deployment</a>
189
  <div class="arrow">⬇️</div>
190
- <div>
191
- <details>
192
- <summary>Click to View Description</summary>
193
- Deploy the trained model into a live system for real-time or batch processing of new data.
194
- </details>
195
- </div>
196
 
197
  <!-- Monitoring -->
198
- <a href="/monitoring" class="phase phase-10" target="_self">Monitoring</a>
199
- <div class="arrow">⬇️</div>
200
- <div>
201
- <details>
202
- <summary>Click to View Description</summary>
203
- Track model performance in production, addressing issues like data drift and performance degradation.
204
- </details>
205
- </div>
206
  </div>
207
  """, unsafe_allow_html=True
208
  )
 
11
  st.markdown("""
12
  <style>
13
  body, .stApp {
14
+ color: #4F4F4F; /* Text color */
15
+ background-color: #FFFFFF; /* Background color */
16
  }
17
  h1, h2, h3, h4, h5, h6 {
18
+ color: #BB3385; /* Heading color */
19
  }
20
  p {
21
+ color: #4F4F4F; /* Text color for paragraphs */
22
  }
23
  ul li {
24
  color: #4F4F4F; /* List item color */
 
26
  </style>
27
  """, unsafe_allow_html=True)
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  # Title of the page
30
  st.markdown("""<div style="text-align: center; margin-top: 20px;"><h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
31
 
32
+ # Inject custom CSS for the flowchart layout
33
  st.markdown(
34
  """
35
  <style>
36
+ .flowchart-container {
 
 
 
37
  display: flex;
38
  flex-direction: column;
39
  align-items: center;
40
+ gap: 20px;
41
+ margin-top: 50px;
42
  }
43
+
44
  /* Styling for each phase (rectangle button) */
45
  .phase {
 
46
  width: 300px; /* Rectangle width */
47
  height: 60px; /* Rectangle height */
 
48
  border-radius: 8px; /* Rounded edges */
49
  font-size: 16px; /* Text size */
50
  font-weight: bold;
51
  text-align: center;
52
  cursor: pointer;
 
 
53
  display: flex;
54
  justify-content: center;
55
  align-items: center;
56
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
57
  transition: transform 0.3s ease, background-color 0.3s ease;
58
+ color: black; /* Text color */
59
  }
60
+
61
  /* Colors for each phase */
62
+ .phase-1 { background-color: #FF7043; } /* Red */
63
+ .phase-2 { background-color: #42A5F5; } /* Blue */
64
+ .phase-3 { background-color: #66BB6A; } /* Green */
65
+ .phase-4 { background-color: #FFEB3B; } /* Yellow */
66
+ .phase-5 { background-color: #F06292; } /* Pink */
67
+ .phase-6 { background-color: #42A5F5; } /* Blue */
68
+ .phase-7 { background-color: #FF7043; } /* Red */
69
+ .phase-8 { background-color: #66BB6A; } /* Green */
70
+ .phase-9 { background-color: #FFEB3B; } /* Yellow */
71
+ .phase-10 { background-color: #F06292; } /* Pink */
72
+
73
  .phase:hover {
74
  transform: scale(1.05);
75
  background-color: #F0F0F0; /* Slightly lighter on hover */
 
76
  }
77
+
78
  .arrow {
79
+ font-size: 24px;
80
+ color: #4F4F4F;
81
+ }
82
+
83
+ .description {
84
+ font-size: 14px;
85
+ color: #4F4F4F;
86
+ margin-top: -5px;
87
  }
88
  </style>
89
  """, unsafe_allow_html=True
90
  )
91
 
92
+ # HTML structure for the flowchart
93
  st.markdown(
94
  """
95
+ <div class="flowchart-container">
96
  <!-- Problem Statement -->
97
+ <a href="/problem-statement" class="phase phase-1" target="_self">1. Problem Statement</a>
98
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
99
 
100
  <!-- Data Collection -->
101
+ <a href="/data-collection" class="phase phase-2" target="_self">2. Data Collection</a>
102
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
103
 
104
  <!-- Simple EDA -->
105
+ <a href="/simple-eda" class="phase phase-3" target="_self">3. Simple EDA</a>
106
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
107
 
108
  <!-- Data Preprocessing -->
109
+ <a href="/data-preprocessing" class="phase phase-4" target="_self">4. Data Preprocessing</a>
110
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
111
 
112
  <!-- EDA -->
113
+ <a href="/eda" class="phase phase-5" target="_self">5. EDA</a>
114
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
115
 
116
  <!-- Feature Engineering -->
117
+ <a href="/feature-engineering" class="phase phase-6" target="_self">6. Feature Engineering</a>
118
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
119
 
120
  <!-- Model Training -->
121
+ <a href="/model-training" class="phase phase-7" target="_self">7. Training the Model</a>
122
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
123
 
124
  <!-- Model Testing -->
125
+ <a href="/model-testing" class="phase phase-8" target="_self">8. Testing the Data</a>
126
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
127
 
128
  <!-- Deployment -->
129
+ <a href="/deployment" class="phase phase-9" target="_self">9. Deployment</a>
130
  <div class="arrow">⬇️</div>
 
 
 
 
 
 
131
 
132
  <!-- Monitoring -->
133
+ <a href="/monitoring" class="phase phase-10" target="_self">10. Monitoring</a>
 
 
 
 
 
 
 
134
  </div>
135
  """, unsafe_allow_html=True
136
  )