Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -22,109 +22,137 @@ st.markdown("""
|
|
| 22 |
margin-top: 20px;
|
| 23 |
margin-bottom: 10px;
|
| 24 |
}
|
| 25 |
-
.
|
| 26 |
-
margin: 0px;
|
| 27 |
-
text-align: center;
|
| 28 |
-
}
|
| 29 |
-
.circle-container {
|
| 30 |
display: flex;
|
|
|
|
| 31 |
justify-content: center;
|
| 32 |
-
|
| 33 |
-
margin:
|
| 34 |
-
}
|
| 35 |
-
.circle {
|
| 36 |
-
position: relative;
|
| 37 |
-
width: 1100px;
|
| 38 |
-
height: 1100px;
|
| 39 |
-
border-radius: 50%;
|
| 40 |
-
display: flex;
|
| 41 |
-
justify-content: center;
|
| 42 |
-
align-items: center;
|
| 43 |
-
}
|
| 44 |
-
.steps {
|
| 45 |
-
position: absolute;
|
| 46 |
-
width: 100%;
|
| 47 |
-
height: 100%;
|
| 48 |
-
display: flex;
|
| 49 |
-
justify-content: center;
|
| 50 |
-
align-items: center;
|
| 51 |
}
|
| 52 |
-
.
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
height: 60px;
|
| 56 |
font-size: 16px;
|
| 57 |
font-weight: bold;
|
|
|
|
| 58 |
border-radius: 30px;
|
| 59 |
-
|
| 60 |
-
justify-content: center;
|
| 61 |
-
align-items: center;
|
| 62 |
-
text-align: center;
|
| 63 |
cursor: pointer;
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
color:
|
| 68 |
}
|
| 69 |
-
.step1 { background-color: #FFDDC1; } /* Light Orange */
|
| 70 |
-
.step2 { background-color: #D4F1F4; } /* Light Blue */
|
| 71 |
-
.step3 { background-color: #D5ECC2; } /* Light Green */
|
| 72 |
-
.step4 { background-color: #F8C3DF; } /* Light Pink */
|
| 73 |
-
.step5 { background-color: #FFF7C0; } /* Light Yellow */
|
| 74 |
-
.step6 { background-color: #CDE7FF; } /* Sky Blue */
|
| 75 |
-
.step7 { background-color: #FEE9B2; } /* Light Peach */
|
| 76 |
-
.step8 { background-color: #FFCBCB; } /* Light Red */
|
| 77 |
-
.step9 { background-color: #E4F9F5; } /* Mint Green */
|
| 78 |
-
.step10 { background-color: #FFD9E8; } /* Soft Pink */
|
| 79 |
-
#step1 { transform: rotate(0deg) translateX(320px) rotate(-0deg); }
|
| 80 |
-
#step2 { transform: rotate(36deg) translateX(320px) rotate(-36deg); }
|
| 81 |
-
#step3 { transform: rotate(72deg) translateX(320px) rotate(-72deg); }
|
| 82 |
-
#step4 { transform: rotate(108deg) translateX(320px) rotate(-108deg); }
|
| 83 |
-
#step5 { transform: rotate(144deg) translateX(320px) rotate(-144deg); }
|
| 84 |
-
#step6 { transform: rotate(180deg) translateX(320px) rotate(-180deg); }
|
| 85 |
-
#step7 { transform: rotate(216deg) translateX(320px) rotate(-216deg); }
|
| 86 |
-
#step8 { transform: rotate(252deg) translateX(320px) rotate(-252deg); }
|
| 87 |
-
#step9 { transform: rotate(288deg) translateX(320px) rotate(-288deg); }
|
| 88 |
-
#step10 { transform: rotate(324deg) translateX(320px) rotate(-324deg); }
|
| 89 |
</style>
|
| 90 |
""", unsafe_allow_html=True)
|
| 91 |
|
| 92 |
-
#
|
| 93 |
-
|
| 94 |
-
st.
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
- Starting from defining the problem and collecting data.<br>
|
| 100 |
-
- Building, deploying, and monitoring the model.<br>
|
| 101 |
-
- Each step plays a significant role in ensuring the success of the project:
|
| 102 |
-
- Addressing technical and practical challenges along the way.<br>
|
| 103 |
-
- By following these steps, you can create a robust and efficient ML solution.
|
| 104 |
-
</div>
|
| 105 |
-
""",
|
| 106 |
-
unsafe_allow_html=True,
|
| 107 |
-
)
|
| 108 |
|
| 109 |
-
#
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
<
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
<div class="step step10" id="step10"><a href="/?page=Monitoring" style="color:black;">Monitoring</a></div>
|
| 124 |
</div>
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
-
|
| 130 |
-
st.markdown(
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
margin-top: 20px;
|
| 23 |
margin-bottom: 10px;
|
| 24 |
}
|
| 25 |
+
.button-container {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
display: flex;
|
| 27 |
+
flex-wrap: wrap;
|
| 28 |
justify-content: center;
|
| 29 |
+
gap: 20px;
|
| 30 |
+
margin-top: 20px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
}
|
| 32 |
+
.stButton > button {
|
| 33 |
+
background-color: #f0f8ff; /* Light background color */
|
| 34 |
+
color: black; /* Black text */
|
|
|
|
| 35 |
font-size: 16px;
|
| 36 |
font-weight: bold;
|
| 37 |
+
border: none;
|
| 38 |
border-radius: 30px;
|
| 39 |
+
padding: 10px 20px;
|
|
|
|
|
|
|
|
|
|
| 40 |
cursor: pointer;
|
| 41 |
+
transition: 0.3s;
|
| 42 |
+
}
|
| 43 |
+
.stButton > button:hover {
|
| 44 |
+
background-color: #e6e6fa; /* Slightly darker on hover */
|
| 45 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
</style>
|
| 47 |
""", unsafe_allow_html=True)
|
| 48 |
|
| 49 |
+
# Function to navigate between pages
|
| 50 |
+
def navigate_to(page_name):
|
| 51 |
+
st.experimental_set_query_params(page=page_name)
|
| 52 |
+
|
| 53 |
+
# Get the current page from query parameters
|
| 54 |
+
query_params = st.experimental_get_query_params()
|
| 55 |
+
current_page = query_params.get("page", ["Home"])[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
# Main content
|
| 58 |
+
if current_page == "Home":
|
| 59 |
+
# Home Page Content
|
| 60 |
+
st.markdown('<h1>Life Cycle of End-to-End ML Project</h1>', unsafe_allow_html=True)
|
| 61 |
+
st.markdown(
|
| 62 |
+
"""
|
| 63 |
+
<div class="description">
|
| 64 |
+
- In this page, I will take you through the 10 crucial steps involved in the life cycle of a Machine Learning project.<br>
|
| 65 |
+
- These steps outline the entire process:
|
| 66 |
+
- Starting from defining the problem and collecting data.<br>
|
| 67 |
+
- Building, deploying, and monitoring the model.<br>
|
| 68 |
+
- Each step plays a significant role in ensuring the success of the project:
|
| 69 |
+
- Addressing technical and practical challenges along the way.<br>
|
| 70 |
+
- By following these steps, you can create a robust and efficient ML solution.
|
|
|
|
| 71 |
</div>
|
| 72 |
+
""",
|
| 73 |
+
unsafe_allow_html=True,
|
| 74 |
+
)
|
| 75 |
+
# Buttons for navigation
|
| 76 |
+
st.markdown('<div class="button-container">', unsafe_allow_html=True)
|
| 77 |
+
if st.button("Problem Statement"):
|
| 78 |
+
navigate_to("ProblemStatement")
|
| 79 |
+
if st.button("Data Collection"):
|
| 80 |
+
navigate_to("DataCollection")
|
| 81 |
+
if st.button("Simple EDA"):
|
| 82 |
+
navigate_to("SimpleEDA")
|
| 83 |
+
if st.button("Data Preprocessing"):
|
| 84 |
+
navigate_to("DataPreprocessing")
|
| 85 |
+
if st.button("EDA"):
|
| 86 |
+
navigate_to("EDA")
|
| 87 |
+
if st.button("Feature Engineering"):
|
| 88 |
+
navigate_to("FeatureEngineering")
|
| 89 |
+
if st.button("Model Training"):
|
| 90 |
+
navigate_to("ModelTraining")
|
| 91 |
+
if st.button("Model Testing"):
|
| 92 |
+
navigate_to("ModelTesting")
|
| 93 |
+
if st.button("Model Deployment"):
|
| 94 |
+
navigate_to("ModelDeployment")
|
| 95 |
+
if st.button("Monitoring"):
|
| 96 |
+
navigate_to("Monitoring")
|
| 97 |
+
st.markdown('</div>', unsafe_allow_html=True)
|
| 98 |
+
|
| 99 |
+
# Individual Page Content
|
| 100 |
+
elif current_page == "ProblemStatement":
|
| 101 |
+
st.markdown("<h1>Problem Statement</h1>", unsafe_allow_html=True)
|
| 102 |
+
st.write("Define the objective, scope, and constraints of the machine learning project.")
|
| 103 |
+
if st.button("Go Back"):
|
| 104 |
+
navigate_to("Home")
|
| 105 |
+
|
| 106 |
+
elif current_page == "DataCollection":
|
| 107 |
+
st.markdown("<h1>Data Collection</h1>", unsafe_allow_html=True)
|
| 108 |
+
st.write("Collect and gather relevant data from various sources for analysis.")
|
| 109 |
+
if st.button("Go Back"):
|
| 110 |
+
navigate_to("Home")
|
| 111 |
+
|
| 112 |
+
elif current_page == "SimpleEDA":
|
| 113 |
+
st.markdown("<h1>Simple EDA</h1>", unsafe_allow_html=True)
|
| 114 |
+
st.write("Perform basic exploratory data analysis to understand the dataset structure.")
|
| 115 |
+
if st.button("Go Back"):
|
| 116 |
+
navigate_to("Home")
|
| 117 |
+
|
| 118 |
+
elif current_page == "DataPreprocessing":
|
| 119 |
+
st.markdown("<h1>Data Preprocessing</h1>", unsafe_allow_html=True)
|
| 120 |
+
st.write("Clean and preprocess the collected data to make it suitable for modeling.")
|
| 121 |
+
if st.button("Go Back"):
|
| 122 |
+
navigate_to("Home")
|
| 123 |
+
|
| 124 |
+
elif current_page == "EDA":
|
| 125 |
+
st.markdown("<h1>EDA</h1>", unsafe_allow_html=True)
|
| 126 |
+
st.write("Perform advanced exploratory data analysis to identify patterns and insights.")
|
| 127 |
+
if st.button("Go Back"):
|
| 128 |
+
navigate_to("Home")
|
| 129 |
+
|
| 130 |
+
elif current_page == "FeatureEngineering":
|
| 131 |
+
st.markdown("<h1>Feature Engineering</h1>", unsafe_allow_html=True)
|
| 132 |
+
st.write("Create, select, or transform features to improve model performance.")
|
| 133 |
+
if st.button("Go Back"):
|
| 134 |
+
navigate_to("Home")
|
| 135 |
+
|
| 136 |
+
elif current_page == "ModelTraining":
|
| 137 |
+
st.markdown("<h1>Model Training</h1>", unsafe_allow_html=True)
|
| 138 |
+
st.write("Train machine learning models on the preprocessed data.")
|
| 139 |
+
if st.button("Go Back"):
|
| 140 |
+
navigate_to("Home")
|
| 141 |
+
|
| 142 |
+
elif current_page == "ModelTesting":
|
| 143 |
+
st.markdown("<h1>Model Testing</h1>", unsafe_allow_html=True)
|
| 144 |
+
st.write("Test the trained models using validation or test datasets.")
|
| 145 |
+
if st.button("Go Back"):
|
| 146 |
+
navigate_to("Home")
|
| 147 |
+
|
| 148 |
+
elif current_page == "ModelDeployment":
|
| 149 |
+
st.markdown("<h1>Model Deployment</h1>", unsafe_allow_html=True)
|
| 150 |
+
st.write("Deploy the model to production for real-world usage.")
|
| 151 |
+
if st.button("Go Back"):
|
| 152 |
+
navigate_to("Home")
|
| 153 |
|
| 154 |
+
elif current_page == "Monitoring":
|
| 155 |
+
st.markdown("<h1>Monitoring</h1>", unsafe_allow_html=True)
|
| 156 |
+
st.write("Monitor the model's performance in production and retrain if needed.")
|
| 157 |
+
if st.button("Go Back"):
|
| 158 |
+
navigate_to("Home")
|