Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -1,118 +1,218 @@
|
|
| 1 |
-
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
-
# Set the Streamlit page configuration
|
| 5 |
st.set_page_config(
|
| 6 |
-
page_title="
|
| 7 |
-
page_icon="
|
| 8 |
layout="wide"
|
| 9 |
)
|
| 10 |
|
| 11 |
-
# Global CSS styling
|
| 12 |
-
st.markdown("""
|
| 13 |
<style>
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
</style>
|
| 23 |
""", unsafe_allow_html=True)
|
| 24 |
|
| 25 |
-
# Display page title
|
| 26 |
st.markdown(
|
| 27 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
unsafe_allow_html=True
|
| 29 |
)
|
| 30 |
|
| 31 |
-
#
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
'2. Data Collection': "**Data Collection**: Gather data from reliable sources such as APIs, web scraping, or datasets.",
|
| 35 |
-
'3. Simple EDA': "**Simple EDA**: Perform quick exploratory analysis to identify missing values and outliers.",
|
| 36 |
-
'4. Data Preprocessing': "**Data Preprocessing**: Clean the data and prepare it for analysis and modeling.",
|
| 37 |
-
'5. EDA': "**EDA**: Perform detailed analysis to uncover patterns, relationships, and trends.",
|
| 38 |
-
'6. Feature Engineering': "**Feature Engineering**: Create new features or transform existing ones for better model accuracy.",
|
| 39 |
-
'7. Model Training': "**Model Training**: Train machine learning models using the prepared data.",
|
| 40 |
-
'8. Model Testing': "**Model Testing**: Evaluate the model's performance using metrics like accuracy or recall.",
|
| 41 |
-
'9. Deployment': "**Deployment**: Deploy the model for real-world usage in production environments.",
|
| 42 |
-
'10. Monitoring': "**Monitoring**: Continuously monitor model performance and update it as required."
|
| 43 |
-
}
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
|
|
|
| 47 |
<!DOCTYPE html>
|
| 48 |
<html lang="en">
|
| 49 |
<head>
|
| 50 |
<meta charset="UTF-8">
|
| 51 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
| 52 |
<style>
|
| 53 |
-
|
|
|
|
| 54 |
display: flex;
|
| 55 |
justify-content: center;
|
| 56 |
align-items: center;
|
| 57 |
-
height:
|
| 58 |
-
margin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
}
|
| 60 |
.circle {
|
| 61 |
position: relative;
|
| 62 |
-
width:
|
| 63 |
-
height:
|
|
|
|
| 64 |
border-radius: 50%;
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
-
.
|
| 67 |
position: absolute;
|
| 68 |
-
width:
|
| 69 |
-
height:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
background-color: #007bff;
|
| 71 |
color: white;
|
| 72 |
-
|
| 73 |
-
line-height: 50px;
|
| 74 |
border-radius: 8px;
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
}
|
| 77 |
.step:hover {
|
| 78 |
background-color: #0056b3;
|
| 79 |
}
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
</style>
|
| 91 |
</head>
|
| 92 |
<body>
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
<div class="step">
|
| 98 |
-
<div class="step">
|
| 99 |
-
<div class="step">
|
| 100 |
-
<div class="step">
|
| 101 |
-
<div class="step">
|
| 102 |
-
<div class="step">
|
| 103 |
-
<div class="step">
|
| 104 |
-
<div class="step">
|
|
|
|
|
|
|
| 105 |
</div>
|
| 106 |
</div>
|
|
|
|
| 107 |
</body>
|
| 108 |
</html>
|
| 109 |
"""
|
| 110 |
|
| 111 |
-
#
|
| 112 |
-
st.markdown(
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
st.write(
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
|
|
|
| 3 |
st.set_page_config(
|
| 4 |
+
page_title="HomePage",
|
| 5 |
+
page_icon="🚀",
|
| 6 |
layout="wide"
|
| 7 |
)
|
| 8 |
|
| 9 |
+
# Global CSS for consistent styling across all pages
|
| 10 |
+
st.markdown("""
|
| 11 |
<style>
|
| 12 |
+
body, .stApp {
|
| 13 |
+
color: #4F4F4F; /* Replace with your desired font color */
|
| 14 |
+
background-color: #FFFFFF; /* Optional: Set a fixed background color */
|
| 15 |
+
}
|
| 16 |
+
h1, h2, h3, h4, h5, h6 {
|
| 17 |
+
color: #BB3385; /* Replace with your heading color */
|
| 18 |
+
}
|
| 19 |
+
p {
|
| 20 |
+
color: #4F4F4F; /* Replace with your paragraph text color */
|
| 21 |
+
}
|
| 22 |
+
ul li {
|
| 23 |
+
color: #4F4F4F; /* List item color */
|
| 24 |
+
}
|
| 25 |
</style>
|
| 26 |
""", unsafe_allow_html=True)
|
| 27 |
|
|
|
|
| 28 |
st.markdown(
|
| 29 |
+
"""
|
| 30 |
+
<style>
|
| 31 |
+
.stApp {
|
| 32 |
+
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");
|
| 33 |
+
background-size: cover;
|
| 34 |
+
background-repeat: no-repeat;
|
| 35 |
+
background-attachment: fixed;
|
| 36 |
+
}
|
| 37 |
+
</style>
|
| 38 |
+
""",
|
| 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 |
|
| 46 |
+
|
| 47 |
+
# Circle Representation HTML and CSS (properly rendered)
|
| 48 |
+
html_code = """
|
| 49 |
<!DOCTYPE html>
|
| 50 |
<html lang="en">
|
| 51 |
<head>
|
| 52 |
<meta charset="UTF-8">
|
| 53 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 54 |
+
<title>Machine Learning Project Life Cycle</title>
|
| 55 |
<style>
|
| 56 |
+
body {
|
| 57 |
+
font-family: Arial, sans-serif;
|
| 58 |
display: flex;
|
| 59 |
justify-content: center;
|
| 60 |
align-items: center;
|
| 61 |
+
height: 100vh;
|
| 62 |
+
margin: 0;
|
| 63 |
+
background-color: #f4f4f9;
|
| 64 |
+
}
|
| 65 |
+
.container {
|
| 66 |
+
text-align: center;
|
| 67 |
+
width: 80%;
|
| 68 |
+
max-width: 800px;
|
| 69 |
}
|
| 70 |
.circle {
|
| 71 |
position: relative;
|
| 72 |
+
width: 350px;
|
| 73 |
+
height: 350px;
|
| 74 |
+
margin: 20px auto;
|
| 75 |
border-radius: 50%;
|
| 76 |
+
display: flex;
|
| 77 |
+
justify-content: center;
|
| 78 |
+
align-items: center;
|
| 79 |
}
|
| 80 |
+
.steps {
|
| 81 |
position: absolute;
|
| 82 |
+
width: 100%;
|
| 83 |
+
height: 100%;
|
| 84 |
+
display: flex;
|
| 85 |
+
justify-content: center;
|
| 86 |
+
align-items: center;
|
| 87 |
+
flex-wrap: wrap;
|
| 88 |
+
}
|
| 89 |
+
.step {
|
| 90 |
background-color: #007bff;
|
| 91 |
color: white;
|
| 92 |
+
padding: 15px 30px;
|
|
|
|
| 93 |
border-radius: 8px;
|
| 94 |
+
cursor: pointer;
|
| 95 |
+
width: 150px;
|
| 96 |
+
margin: 10px;
|
| 97 |
+
text-align: center;
|
| 98 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 99 |
+
transition: background-color 0.3s;
|
| 100 |
+
position: absolute;
|
| 101 |
+
transform-origin: 50% 50%;
|
| 102 |
+
transition: transform 0.5s ease-in-out;
|
| 103 |
}
|
| 104 |
.step:hover {
|
| 105 |
background-color: #0056b3;
|
| 106 |
}
|
| 107 |
+
/* Different background colors for each step */
|
| 108 |
+
#step1 {
|
| 109 |
+
background-color: #ff5733;
|
| 110 |
+
transform: rotate(0deg) translateX(140px) rotate(0deg);
|
| 111 |
+
}
|
| 112 |
+
#step2 {
|
| 113 |
+
background-color: #33b5ff;
|
| 114 |
+
transform: rotate(36deg) translateX(140px) rotate(-36deg);
|
| 115 |
+
}
|
| 116 |
+
#step3 {
|
| 117 |
+
background-color: #33ff57;
|
| 118 |
+
transform: rotate(72deg) translateX(140px) rotate(-72deg);
|
| 119 |
+
}
|
| 120 |
+
#step4 {
|
| 121 |
+
background-color: #ff33cc;
|
| 122 |
+
transform: rotate(108deg) translateX(140px) rotate(-108deg);
|
| 123 |
+
}
|
| 124 |
+
#step5 {
|
| 125 |
+
background-color: #ffcc33;
|
| 126 |
+
transform: rotate(144deg) translateX(140px) rotate(-144deg);
|
| 127 |
+
}
|
| 128 |
+
#step6 {
|
| 129 |
+
background-color: #33ccff;
|
| 130 |
+
transform: rotate(180deg) translateX(140px) rotate(-180deg);
|
| 131 |
+
}
|
| 132 |
+
#step7 {
|
| 133 |
+
background-color: #ff33a1;
|
| 134 |
+
transform: rotate(216deg) translateX(140px) rotate(-216deg);
|
| 135 |
+
}
|
| 136 |
+
#step8 {
|
| 137 |
+
background-color: #66ff33;
|
| 138 |
+
transform: rotate(252deg) translateX(140px) rotate(-252deg);
|
| 139 |
+
}
|
| 140 |
+
#step9 {
|
| 141 |
+
background-color: #9933ff;
|
| 142 |
+
transform: rotate(288deg) translateX(140px) rotate(-288deg);
|
| 143 |
+
}
|
| 144 |
+
#step10 {
|
| 145 |
+
background-color: #f7a500;
|
| 146 |
+
transform: rotate(324deg) translateX(140px) rotate(-324deg);
|
| 147 |
+
}
|
| 148 |
+
/* Rotate steps to form a circular layout */
|
| 149 |
+
#step4 {
|
| 150 |
+
transform: rotate(0deg) translateX(250px) rotate(0deg);
|
| 151 |
+
}
|
| 152 |
+
#step5 {
|
| 153 |
+
transform: rotate(25deg) translateX(250px) rotate(-25deg);
|
| 154 |
+
}
|
| 155 |
+
#step6 {
|
| 156 |
+
transform: rotate(60deg) translateX(250px) rotate(-60deg);
|
| 157 |
+
}
|
| 158 |
+
#step7 {
|
| 159 |
+
transform: rotate(120deg) translateX(250px) rotate(-120deg);
|
| 160 |
+
}
|
| 161 |
+
#step8 {
|
| 162 |
+
transform: rotate(155deg) translateX(250px) rotate(-155deg);
|
| 163 |
+
}
|
| 164 |
+
#step9 {
|
| 165 |
+
transform: rotate(180deg) translateX(250px) rotate(-180deg);
|
| 166 |
+
}
|
| 167 |
+
#step10 {
|
| 168 |
+
transform: rotate(205deg) translateX(250px) rotate(-205deg);
|
| 169 |
+
}
|
| 170 |
+
#step1 {
|
| 171 |
+
transform: rotate(240deg) translateX(250px) rotate(-240deg);
|
| 172 |
+
}
|
| 173 |
+
#step2 {
|
| 174 |
+
transform: rotate(300deg) translateX(250px) rotate(-300deg);
|
| 175 |
+
}
|
| 176 |
+
#step3 {
|
| 177 |
+
transform: rotate(335deg) translateX(250px) rotate(-335deg);
|
| 178 |
+
}
|
| 179 |
+
a {
|
| 180 |
+
color: white; /* Link color */
|
| 181 |
+
text-decoration: none;
|
| 182 |
+
}
|
| 183 |
+
a:hover {
|
| 184 |
+
color: yellow; /* Color on hover */
|
| 185 |
+
text-decoration: underline; /* Underline on hover */
|
| 186 |
+
}
|
| 187 |
</style>
|
| 188 |
</head>
|
| 189 |
<body>
|
| 190 |
+
<div class="container">
|
| 191 |
+
<h1></h1>
|
| 192 |
+
<div class="circle">
|
| 193 |
+
<div class="steps">
|
| 194 |
+
<div class="step" id="step1">1. Problem Statement</div>
|
| 195 |
+
<div class="step" id="step2">2. Data Collection</div>
|
| 196 |
+
<div class="step" id="step3">3. Simple EDA</div>
|
| 197 |
+
<div class="step" id="step4">4. Data Pre-Processing</div>
|
| 198 |
+
<div class="step" id="step5">5. EDA</div>
|
| 199 |
+
<div class="step" id="step6">6. Feature Engineering</div>
|
| 200 |
+
<div class="step" id="step7">7. Training the Model</div>
|
| 201 |
+
<div class="step" id="step8">8. Testing the Data</div>
|
| 202 |
+
<div class="step" id="step9">9. Deployment</div>
|
| 203 |
+
<div class="step" id="step10">10. Monitoring</div>
|
| 204 |
</div>
|
| 205 |
</div>
|
| 206 |
+
</div>
|
| 207 |
</body>
|
| 208 |
</html>
|
| 209 |
"""
|
| 210 |
|
| 211 |
+
# Streamlit: Display the HTML circle with properly spaced steps
|
| 212 |
+
st.markdown(html_code, unsafe_allow_html=True)
|
| 213 |
+
st.write(' ')
|
| 214 |
+
st.write(' ')
|
| 215 |
+
st.write(' ')
|
| 216 |
+
st.write(' ')
|
| 217 |
+
st.write(' ')
|
| 218 |
+
st.write(' ')
|