trohith89 commited on
Commit
9bf8981
Β·
verified Β·
1 Parent(s): 2c3c2a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -10
app.py CHANGED
@@ -55,17 +55,26 @@ st.markdown(
55
  background-color:#FFB6C1;
56
  border: 2px solid black;
57
  border-radius: 8px;
58
- padding: 5px;
59
- margin: 5px;
 
 
 
 
 
 
 
 
 
 
60
  text-align: center;
61
- width: auto;
62
  }
63
  </style>
64
  """,
65
  unsafe_allow_html=True,
66
  )
67
 
68
- st.title("🌟 Gradient Descent Interactive Tool 🌟")
69
 
70
  col1, col2 = st.columns([1, 2])
71
 
@@ -172,7 +181,7 @@ with col2:
172
  bordercolor="#001A6E",
173
  borderwidth=2
174
  ),
175
- margin=dict(l=10, r=80, t=10, b=10),
176
  width=800,
177
  height=400,
178
  showlegend=True
@@ -185,11 +194,13 @@ with col2:
185
 
186
  st.markdown(
187
  f"""
188
- <div class="info-box">
189
- πŸ§‘β€πŸ’» Iteration: {st.session_state.iteration}
190
- </div>
191
- <div class="info-box">
192
- πŸ“ Current Point: ({st.session_state.x:.4f}, {st.session_state.y_vals[-1]:.4f})
 
 
193
  </div>
194
  """,
195
  unsafe_allow_html=True,
 
55
  background-color:#FFB6C1;
56
  border: 2px solid black;
57
  border-radius: 8px;
58
+ padding: 10px 15px;
59
+ margin: 5px 10px;
60
+ text-align: center;
61
+ font-size: 18px;
62
+ color: black;
63
+ }
64
+ .info-container {
65
+ display: flex;
66
+ justify-content: flex-end;
67
+ margin-top: 20px;
68
+ }
69
+ .center-title {
70
  text-align: center;
 
71
  }
72
  </style>
73
  """,
74
  unsafe_allow_html=True,
75
  )
76
 
77
+ st.markdown("""<h1 class="center-title">🌟 Gradient Descent Interactive Tool 🌟</h1>""", unsafe_allow_html=True)
78
 
79
  col1, col2 = st.columns([1, 2])
80
 
 
181
  bordercolor="#001A6E",
182
  borderwidth=2
183
  ),
184
+ margin=dict(l=10, r=100, t=10, b=10), # Increase right margin here
185
  width=800,
186
  height=400,
187
  showlegend=True
 
194
 
195
  st.markdown(
196
  f"""
197
+ <div class="info-container">
198
+ <div class="info-box">
199
+ πŸ§‘β€πŸ’» Iteration: {st.session_state.iteration}
200
+ </div>
201
+ <div class="info-box">
202
+ πŸ“ Current Point: ({st.session_state.x:.4f}, {st.session_state.y_vals[-1]:.4f})
203
+ </div>
204
  </div>
205
  """,
206
  unsafe_allow_html=True,