LakshmiHarika commited on
Commit
23a60eb
·
verified ·
1 Parent(s): 95ea7ea

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

Browse files
pages/3Life Cycle of Machine Learning Project.py CHANGED
@@ -46,3 +46,98 @@ st.markdown("""
46
 
47
 
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47
 
48
 
49
+ import streamlit as st
50
+
51
+ # Custom CSS for Circular Layout
52
+ custom_css = """
53
+ <style>
54
+ html, body, [data-testid="stAppViewContainer"] {
55
+ font-family: Arial, sans-serif;
56
+ color: #333;
57
+ background-color: #f5f5f5;
58
+ }
59
+ .circle-container {
60
+ display: flex;
61
+ justify-content: center;
62
+ align-items: center;
63
+ position: relative;
64
+ width: 600px;
65
+ height: 600px;
66
+ margin: 0 auto;
67
+ }
68
+ .circle-container .button {
69
+ position: absolute;
70
+ width: 100px;
71
+ height: 100px;
72
+ background: #2e2e3e;
73
+ color: white;
74
+ border-radius: 50%;
75
+ display: flex;
76
+ justify-content: center;
77
+ align-items: center;
78
+ text-align: center;
79
+ font-size: 0.9rem;
80
+ text-decoration: none;
81
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
82
+ cursor: pointer;
83
+ transition: transform 0.2s, background 0.2s;
84
+ }
85
+ .circle-container .button:hover {
86
+ transform: scale(1.1);
87
+ background: #444;
88
+ }
89
+ /* Adjust button positions for a perfect circle */
90
+ .button:nth-child(1) { top: 10%; left: 50%; transform: translate(-50%, -50%); } /* Top */
91
+ .button:nth-child(2) { top: 20%; left: 75%; transform: translate(-50%, -50%); }
92
+ .button:nth-child(3) { top: 50%; left: 90%; transform: translate(-50%, -50%); }
93
+ .button:nth-child(4) { top: 75%; left: 75%; transform: translate(-50%, -50%); }
94
+ .button:nth-child(5) { top: 90%; left: 50%; transform: translate(-50%, -50%); } /* Bottom */
95
+ .button:nth-child(6) { top: 75%; left: 25%; transform: translate(-50%, -50%); }
96
+ .button:nth-child(7) { top: 50%; left: 10%; transform: translate(-50%, -50%); }
97
+ .button:nth-child(8) { top: 25%; left: 25%; transform: translate(-50%, -50%); }
98
+ .button:nth-child(9) { top: 30%; left: 60%; transform: translate(-50%, -50%); }
99
+ .button:nth-child(10) { top: 50%; left: 50%; transform: translate(-50%, -50%); } /* Center */
100
+
101
+ .arrow {
102
+ position: absolute;
103
+ width: 80px;
104
+ height: 80px;
105
+ border: 2px solid black;
106
+ border-width: 3px 3px 0 0;
107
+ transform: rotate(45deg);
108
+ z-index: -1;
109
+ }
110
+ </style>
111
+ """
112
+
113
+ # HTML for Lifecycle Buttons with Arrows
114
+ ml_lifecycle_html = """
115
+ <div class="circle-container">
116
+ <a href="?step=1" class="button">Step 1</a>
117
+ <a href="?step=2" class="button">Step 2</a>
118
+ <a href="?step=3" class="button">Step 3</a>
119
+ <a href="?step=4" class="button">Step 4</a>
120
+ <a href="?step=5" class="button">Step 5</a>
121
+ <a href="?step=6" class="button">Step 6</a>
122
+ <a href="?step=7" class="button">Step 7</a>
123
+ <a href="?step=8" class="button">Step 8</a>
124
+ <a href="?step=9" class="button">Step 9</a>
125
+ <a href="?step=10" class="button">Step 10</a>
126
+ </div>
127
+ """
128
+
129
+ # Apply CSS and Render HTML
130
+ st.markdown(custom_css, unsafe_allow_html=True)
131
+ st.markdown(ml_lifecycle_html, unsafe_allow_html=True)
132
+
133
+ # Query parameters to determine which step is selected
134
+ query_params = st.experimental_get_query_params()
135
+ step = query_params.get("step", [""])[0]
136
+
137
+ # Display dynamic content for each step
138
+ if step:
139
+ st.write(f"## You selected Step {step}")
140
+ st.write(f"Details about Step {step} go here...")
141
+ else:
142
+ st.write("## Welcome to the ML Lifecycle!")
143
+ st.write("Click on any step to view details.")