Spaces:
Sleeping
Sleeping
Update pages/3Life Cycle of Machine Learning Project.py
Browse files
pages/3Life Cycle of Machine Learning Project.py
CHANGED
|
@@ -43,65 +43,54 @@ st.markdown(
|
|
| 43 |
st.markdown("""
|
| 44 |
<div style="text-align: center; margin-top: 20px;">
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
| 46 |
-
|
| 47 |
import streamlit as st
|
| 48 |
-
import
|
| 49 |
|
| 50 |
-
#
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
align-items: center;
|
| 57 |
-
position: relative;
|
| 58 |
-
width: 600px;
|
| 59 |
-
height: 600px;
|
| 60 |
-
margin: 0 auto;
|
| 61 |
-
}
|
| 62 |
-
.circle-button {
|
| 63 |
-
position: absolute;
|
| 64 |
-
width: 80px;
|
| 65 |
-
height: 80px;
|
| 66 |
-
background: #4CAF50;
|
| 67 |
-
color: white;
|
| 68 |
border-radius: 50%;
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
align-items: center;
|
| 72 |
-
font-size: 12px;
|
| 73 |
-
font-weight: bold;
|
| 74 |
text-align: center;
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
}
|
| 82 |
-
</style>
|
| 83 |
-
"""
|
|
|
|
|
|
|
| 84 |
|
| 85 |
-
#
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
buttons_html = ""
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
x = center_x + radius * math.cos(angle) - 40 # Adjust for button center
|
| 93 |
-
y = center_y + radius * math.sin(angle) - 40 # Adjust for button center
|
| 94 |
-
buttons_html += f"""
|
| 95 |
-
<div class="circle-button" style="top: {y}px; left: {x}px;">Step {i + 1}</div>
|
| 96 |
-
"""
|
| 97 |
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
"""
|
|
|
|
|
|
|
|
|
|
| 103 |
|
| 104 |
-
#
|
| 105 |
-
st.markdown(custom_css, unsafe_allow_html=True)
|
| 106 |
-
st.markdown(html_content, unsafe_allow_html=True)
|
| 107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
st.markdown("""
|
| 44 |
<div style="text-align: center; margin-top: 20px;">
|
| 45 |
<h1 style="color: #BB3385;">Life Cycle of End to End ML Project</h1></div>""", unsafe_allow_html=True)
|
|
|
|
| 46 |
import streamlit as st
|
| 47 |
+
from streamlit.components.v1 import html
|
| 48 |
|
| 49 |
+
# Function to create a circular button
|
| 50 |
+
def circular_button(label, link):
|
| 51 |
+
button_html = f"""
|
| 52 |
+
<style>
|
| 53 |
+
.button {{
|
| 54 |
+
display: inline-block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
border-radius: 50%;
|
| 56 |
+
background-color: #4CAF50;
|
| 57 |
+
color: white;
|
|
|
|
|
|
|
|
|
|
| 58 |
text-align: center;
|
| 59 |
+
padding: 20px;
|
| 60 |
+
width: 100px;
|
| 61 |
+
height: 100px;
|
| 62 |
+
text-decoration: none;
|
| 63 |
+
font-size: 16px;
|
| 64 |
+
margin: 10px;
|
| 65 |
+
}}
|
| 66 |
+
</style>
|
| 67 |
+
<a href="{link}" class="button">{label}</a>
|
| 68 |
+
"""
|
| 69 |
+
html(button_html)
|
| 70 |
|
| 71 |
+
# Title
|
| 72 |
+
st.title("Machine Learning Life Cycle")
|
| 73 |
+
st.subheader("Click a step to view details")
|
|
|
|
| 74 |
|
| 75 |
+
# Circular layout for 10 steps
|
| 76 |
+
col1, col2, col3 = st.columns([1, 3, 1]) # Adjust column widths
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
+
# Top half of the circle
|
| 79 |
+
with col2:
|
| 80 |
+
st.write("")
|
| 81 |
+
circular_button("Step 1", "?page=1")
|
| 82 |
+
circular_button("Step 2", "?page=2")
|
| 83 |
+
circular_button("Step 3", "?page=3")
|
| 84 |
+
circular_button("Step 4", "?page=4")
|
| 85 |
+
circular_button("Step 5", "?page=5")
|
| 86 |
|
| 87 |
+
st.write("") # Add some spacing
|
|
|
|
|
|
|
| 88 |
|
| 89 |
+
# Bottom half of the circle
|
| 90 |
+
col1, col2, col3 = st.columns([1, 3, 1]) # Adjust column widths
|
| 91 |
+
with col2:
|
| 92 |
+
circular_button("Step 6", "?page=6")
|
| 93 |
+
circular_button("Step 7", "?page=7")
|
| 94 |
+
circular_button("Step 8", "?page=8")
|
| 95 |
+
circular_button("Step 9", "?page=9")
|
| 96 |
+
circular_button("Step 10", "?page=10")
|