Spaces:
Sleeping
Sleeping
import streamlit as st | |
# HTML content inside a string for correct syntax | |
html_content = """ | |
# Life Cycle of ML | |
The life cycle of Machine Learning (ML) involves several stages, from defining the problem to deploying and monitoring the model. Here's an overview of each stage: | |
1. **Problem Statement:** Understanding the problem and setting objectives for the ML model. | |
2. **Data Collection:** Gathering relevant data for model training. | |
3. **Simple EDA (Exploratory Data Analysis):** Initial analysis to understand the dataset's basic properties. | |
4. **Data Preprocessing:** Cleaning the data to ensure it's in a usable format. | |
5. **EDA (Exploratory Data Analysis):** Deeper analysis to gain insights and find patterns in the data. | |
6. **Feature Engineering:** Creating new features or modifying existing ones to improve model performance. | |
7. **Training:** Training machine learning models using the processed data. | |
8. **Testing:** Evaluating the trained model using a test set to assess its performance. | |
9. **Deploying:** Deploying the model to a production environment. | |
10. **Monitoring:** Continuously monitoring the model's performance in the production environment. | |
--- | |
## Shapes Representing the ML Life Cycle | |
<svg width="800" height="600"> | |
<!-- Problem Statement (Rectangle) --> | |
<rect x="50" y="50" width="150" height="50" fill="#FFB6C1" stroke="#000" /> | |
<text x="125" y="80" fill="#000" font-size="14" text-anchor="middle">Problem Statement</text> | |
<!-- Data Collection (Ellipse) --> | |
<ellipse cx="300" cy="75" rx="80" ry="40" fill="#ADD8E6" stroke="#000" /> | |
<text x="300" y="80" fill="#000" font-size="14" text-anchor="middle">Data Collection</text> | |
<!-- Simple EDA (Ellipse) --> | |
<ellipse cx="500" cy="75" rx="80" ry="40" fill="#90EE90" stroke="#000" /> | |
<text x="500" y="80" fill="#000" font-size="14" text-anchor="middle">Simple EDA</text> | |
<!-- Arrows between Problem Statement, Data Collection, and Simple EDA --> | |
<line x1="200" y1="75" x2="260" y2="75" stroke="#000" marker-end="url(#arrow)" /> | |
<line x1="380" y1="75" x2="460" y2="75" stroke="#000" marker-end="url(#arrow)" /> | |
<!-- Data Preprocessing (Rectangle) --> | |
<rect x="50" y="200" width="150" height="50" fill="#FFD700" stroke="#000" /> | |
<text x="125" y="230" fill="#000" font-size="14" text-anchor="middle">Data Preprocessing</text> | |
<!-- EDA (Circle) --> | |
<circle cx="300" cy="225" r="40" fill="#FF7F50" stroke="#000" /> | |
<text x="300" y="230" fill="#000" font-size="14" text-anchor="middle">EDA</text> | |
<!-- Feature Engineering (Ellipse) --> | |
<ellipse cx="500" cy="225" rx="80" ry="40" fill="#9370DB" stroke="#000" /> | |
<text x="500" y="230" fill="#000" font-size="14" text-anchor="middle">Feature Engineering</text> | |
<!-- Arrows between Data Preprocessing, EDA, and Feature Engineering --> | |
<line x1="125" y1="250" x2="260" y2="225" stroke="#000" marker-end="url(#arrow)" /> | |
<line x1="380" y1="225" x2="460" y2="225" stroke="#000" marker-end="url(#arrow)" /> | |
<!-- Training (Rectangle) --> | |
<rect x="50" y="350" width="150" height="50" fill="#FF6347" stroke="#000" /> | |
<text x="125" y="380" fill="#000" font-size="14" text-anchor="middle">Training</text> | |
<!-- Testing (Circle) --> | |
<circle cx="300" cy="375" r="40" fill="#98FB98" stroke="#000" /> | |
<text x="300" y="380" fill="#000" font-size="14" text-anchor="middle">Testing</text> | |
<!-- Deploying (Ellipse) --> | |
<ellipse cx="500" cy="375" rx="80" ry="40" fill="#F0E68C" stroke="#000" /> | |
<text x="500" y="380" fill="#000" font-size="14" text-anchor="middle">Deploying</text> | |
<!-- Arrows between Training, Testing, and Deploying --> | |
<line x1="125" y1="400" x2="260" y2="375" stroke="#000" marker-end="url(#arrow)" /> | |
<line x1="380" y1="375" x2="460" y2="375" stroke="#000" marker-end="url(#arrow)" /> | |
<!-- Monitoring (Rectangle) --> | |
<rect x="250" y="500" width="150" height="50" fill="#B0E0E6" stroke="#000" /> | |
<text x="325" y="530" fill="#000" font-size="14" text-anchor="middle">Monitoring</text> | |
<!-- Arrow from Deploying to Monitoring --> | |
<line x1="580" y1="375" x2="325" y2="500" stroke="#000" marker-end="url(#arrow)" /> | |
<!-- Define arrow marker --> | |
<defs> | |
<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5" markerWidth="4" markerHeight="4" orient="auto"> | |
<polygon points="0,0 10,5 0,10" fill="#000" /> | |
</marker> | |
</defs> | |
</svg> | |
<!-- Buttons below shapes --> | |
<!-- Problem Statement Button (Rectangle) --> | |
<button style="width: 150px; height: 50px; background-color: #FFB6C1; border: 1px solid #000; text-align: center;">Problem Statement</button> | |
<!-- Data Collection Button (Ellipse) --> | |
<button style="width: 160px; height: 80px; background-color: #ADD8E6; border-radius: 40px; border: 1px solid #000; text-align: center;">Data Collection</button> | |
<!-- Simple EDA Button (Ellipse) --> | |
<button style="width: 160px; height: 80px; background-color: #90EE90; border-radius: 40px; border: 1px solid #000; text-align: center;">Simple EDA</button> | |
<!-- Data Preprocessing Button (Rectangle) --> | |
<button style="width: 150px; height: 50px; background-color: #FFD700; border: 1px solid #000; text-align: center;">Data Preprocessing</button> | |
<!-- EDA Button (Circle) --> | |
<button style="width: 80px; height: 80px; background-color: #FF7F50; border-radius: 50%; border: 1px solid #000; text-align: center;">EDA</button> | |
<!-- Feature Engineering Button (Ellipse) --> | |
<button style="width: 160px; height: 80px; background-color: #9370DB; border-radius: 40px; border: 1px solid #000; text-align: center;">Feature Engineering</button> | |
<!-- Training Button (Rectangle) --> | |
<button style="width: 150px; height: 50px; background-color: #FF6347; border: 1px solid #000; text-align: center;">Training</button> | |
<!-- Testing Button (Circle) --> | |
<button style="width: 80px; height: 80px; background-color: #98FB98; border-radius: 50%; border: 1px solid #000; text-align: center;">Testing</button> | |
<!-- Deploying Button (Ellipse) --> | |
<button style="width: 160px; height: 80px; background-color: #F0E68C; border-radius: 40px; border: 1px solid #000; text-align: center;">Deploying</button> | |
<!-- Monitoring Button (Rectangle) --> | |
<button style="width: 150px; height: 50px; background-color: #B0E0E6; border: 1px solid #000; text-align: center;">Monitoring</button> | |
""" | |
# Render HTML content in Streamlit | |
st.markdown(html_content, unsafe_allow_html=True) | |