LakshmiHarika commited on
Commit
e4a1f49
·
verified ·
1 Parent(s): c79faf5

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

Browse files
pages/3Life Cycle of Machine Learning Project.py CHANGED
@@ -49,77 +49,58 @@ st.markdown("""
49
 
50
  import streamlit as st
51
 
52
- # CSS for Circular Buttons and Arrows
53
  custom_css = """
54
  <style>
55
- .circle-container {
56
  display: flex;
57
- justify-content: center;
58
  align-items: center;
59
- position: relative;
60
- width: 600px;
61
- height: 600px;
62
- margin: 0 auto;
63
  }
64
- .circle-container .button {
65
- position: absolute;
66
- width: 100px;
67
- height: 100px;
68
- background: #2e2e3e;
69
  color: white;
70
  border-radius: 50%;
71
  display: flex;
72
  justify-content: center;
73
  align-items: center;
74
- text-align: center;
75
- font-size: 0.9rem;
76
- text-decoration: none;
77
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
78
  cursor: pointer;
79
- transition: transform 0.2s, background 0.2s;
 
 
80
  }
81
- .circle-container .button:hover {
82
  transform: scale(1.1);
83
- background: #444;
84
  }
85
- /* Perfect circular positions */
86
- .button:nth-child(1) { top: 5%; left: 50%; transform: translate(-50%, -50%); } /* Top */
87
- .button:nth-child(2) { top: 20%; left: 75%; transform: translate(-50%, -50%); }
88
- .button:nth-child(3) { top: 50%; left: 90%; transform: translate(-50%, -50%); }
89
- .button:nth-child(4) { top: 80%; left: 75%; transform: translate(-50%, -50%); }
90
- .button:nth-child(5) { top: 95%; left: 50%; transform: translate(-50%, -50%); } /* Bottom */
91
- .button:nth-child(6) { top: 80%; left: 25%; transform: translate(-50%, -50%); }
92
- .button:nth-child(7) { top: 50%; left: 10%; transform: translate(-50%, -50%); }
93
- .button:nth-child(8) { top: 20%; left: 25%; transform: translate(-50%, -50%); }
94
- .button:nth-child(9) { top: 10%; left: 65%; transform: translate(-50%, -50%); }
95
- .button:nth-child(10) { top: 30%; left: 35%; transform: translate(-50%, -50%); }
96
-
97
- /* Arrows between steps */
98
  .arrow {
99
- position: absolute;
100
- width: 50px;
101
- height: 50px;
102
- border: 2px solid black;
103
- border-width: 3px 3px 0 0;
104
- transform: rotate(45deg);
105
- z-index: -1;
106
  }
107
  </style>
108
  """
109
 
110
- # HTML for Buttons with Arrows
111
  ml_lifecycle_html = """
112
- <div class="circle-container">
113
- <a href="?step=1" class="button">Step 1</a>
114
- <a href="?step=2" class="button">Step 2</a>
115
- <a href="?step=3" class="button">Step 3</a>
116
- <a href="?step=4" class="button">Step 4</a>
117
- <a href="?step=5" class="button">Step 5</a>
118
- <a href="?step=6" class="button">Step 6</a>
119
- <a href="?step=7" class="button">Step 7</a>
120
- <a href="?step=8" class="button">Step 8</a>
121
- <a href="?step=9" class="button">Step 9</a>
122
- <a href="?step=10" class="button">Step 10</a>
123
  </div>
124
  """
125
 
@@ -127,11 +108,10 @@ ml_lifecycle_html = """
127
  st.markdown(custom_css, unsafe_allow_html=True)
128
  st.markdown(ml_lifecycle_html, unsafe_allow_html=True)
129
 
130
- # Query parameters to determine the selected step
131
  query_params = st.query_params
132
  selected_step = query_params.get("step", [""])[0]
133
 
134
- # Display dynamic content for each step
135
  if selected_step:
136
  st.write(f"## You selected Step {selected_step}")
137
  st.write(f"Details about Step {selected_step} go here...")
 
49
 
50
  import streamlit as st
51
 
52
+ # CSS for the Circular Buttons and Layout
53
  custom_css = """
54
  <style>
55
+ .vertical-container {
56
  display: flex;
57
+ flex-direction: column;
58
  align-items: center;
59
+ margin: 20px;
 
 
 
60
  }
61
+ .circle-button {
62
+ width: 80px;
63
+ height: 80px;
64
+ background-color: #4CAF50;
 
65
  color: white;
66
  border-radius: 50%;
67
  display: flex;
68
  justify-content: center;
69
  align-items: center;
70
+ font-size: 14px;
71
+ font-weight: bold;
 
 
72
  cursor: pointer;
73
+ margin: 10px 0;
74
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
75
+ transition: transform 0.2s, background-color 0.2s;
76
  }
77
+ .circle-button:hover {
78
  transform: scale(1.1);
79
+ background-color: #3e8e41;
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  .arrow {
82
+ width: 20px;
83
+ height: 20px;
84
+ border-left: 4px solid green;
85
+ border-bottom: 4px solid green;
86
+ transform: rotate(-45deg);
87
+ margin: -10px 0 10px 0;
 
88
  }
89
  </style>
90
  """
91
 
92
+ # HTML Structure
93
  ml_lifecycle_html = """
94
+ <div class="vertical-container">
95
+ <div class="circle-button">Step 1</div>
96
+ <div class="arrow"></div>
97
+ <div class="circle-button">Step 2</div>
98
+ <div class="arrow"></div>
99
+ <div class="circle-button">Step 3</div>
100
+ <div class="arrow"></div>
101
+ <div class="circle-button">Step 4</div>
102
+ <div class="arrow"></div>
103
+ <div class="circle-button">Step 5</div>
 
104
  </div>
105
  """
106
 
 
108
  st.markdown(custom_css, unsafe_allow_html=True)
109
  st.markdown(ml_lifecycle_html, unsafe_allow_html=True)
110
 
111
+ # Add functionality for each step (optional)
112
  query_params = st.query_params
113
  selected_step = query_params.get("step", [""])[0]
114
 
 
115
  if selected_step:
116
  st.write(f"## You selected Step {selected_step}")
117
  st.write(f"Details about Step {selected_step} go here...")