LakshmiHarika commited on
Commit
d274247
·
verified ·
1 Parent(s): 0a4221a

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

Browse files
pages/3Life Cycle of Machine Learning Project.py CHANGED
@@ -47,7 +47,7 @@ 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 {{
@@ -56,12 +56,13 @@ def circular_button(label, link):
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>
@@ -70,27 +71,47 @@ def circular_button(label, link):
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")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  from streamlit.components.v1 import html
48
 
49
  # Function to create a circular button
50
+ def circular_button(label, link, position):
51
  button_html = f"""
52
  <style>
53
  .button {{
 
56
  background-color: #4CAF50;
57
  color: white;
58
  text-align: center;
59
+ padding: 15px;
60
+ width: 80px;
61
+ height: 80px;
62
  text-decoration: none;
63
+ font-size: 14px;
64
+ position: absolute;
65
+ {position}
66
  }}
67
  </style>
68
  <a href="{link}" class="button">{label}</a>
 
71
 
72
  # Title
73
  st.title("Machine Learning Life Cycle")
74
+ st.write("Click on any step to navigate.")
75
+
76
+ # Container for circular layout
77
+ circular_layout = """
78
+ <div style="position: relative; width: 400px; height: 400px; margin: 0 auto;">
79
+ </div>
80
+ """
81
+
82
+ # Add buttons in circular flow using positions
83
+ html("""
84
+ <div style="position: relative; width: 400px; height: 400px; margin: 0 auto;">
85
+
86
+ <!-- Step 1 -->
87
+ <a href="?page=1" class="button" style="top: 0%; left: 50%; transform: translate(-50%, -50%);">Step 1</a>
88
+
89
+ <!-- Step 2 -->
90
+ <a href="?page=2" class="button" style="top: 20%; left: 75%; transform: translate(-50%, -50%);">Step 2</a>
91
+
92
+ <!-- Step 3 -->
93
+ <a href="?page=3" class="button" style="top: 50%; left: 90%; transform: translate(-50%, -50%);">Step 3</a>
94
+
95
+ <!-- Step 4 -->
96
+ <a href="?page=4" class="button" style="top: 75%; left: 75%; transform: translate(-50%, -50%);">Step 4</a>
97
+
98
+ <!-- Step 5 -->
99
+ <a href="?page=5" class="button" style="top: 100%; left: 50%; transform: translate(-50%, -50%);">Step 5</a>
100
+
101
+ <!-- Step 6 -->
102
+ <a href="?page=6" class="button" style="top: 75%; left: 25%; transform: translate(-50%, -50%);">Step 6</a>
103
+
104
+ <!-- Step 7 -->
105
+ <a href="?page=7" class="button" style="top: 50%; left: 10%; transform: translate(-50%, -50%);">Step 7</a>
106
+
107
+ <!-- Step 8 -->
108
+ <a href="?page=8" class="button" style="top: 20%; left: 25%; transform: translate(-50%, -50%);">Step 8</a>
109
+
110
+ <!-- Step 9 -->
111
+ <a href="?page=9" class="button" style="top: 0%; left: 50%; transform: translate(-50%, -50%);">Step 9</a>
112
+
113
+ <!-- Step 10 -->
114
+ <a href="?page=10" class="button" style="top: -10%; left: 75%; transform: translate(-50%, -50%);">Step 10</a>
115
+
116
+ </div>
117
+ """, height=500)