Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -70,7 +70,7 @@ def update_iteration(step):
|
|
| 70 |
|
| 71 |
# Buttons to run descent step and reset
|
| 72 |
col1, col2 = st.columns([1, 1])
|
| 73 |
-
with
|
| 74 |
if st.button("🔄 Run Descent Step"):
|
| 75 |
grad = derivative(func_input, st.session_state.x)
|
| 76 |
st.session_state.x -= learning_rate * grad
|
|
@@ -78,7 +78,7 @@ with col4:
|
|
| 78 |
st.session_state.x_vals.append(st.session_state.x)
|
| 79 |
st.session_state.y_vals.append(safe_eval(func_input, st.session_state.x))
|
| 80 |
|
| 81 |
-
with
|
| 82 |
if st.button("🔄 Reset", on_click=reset_state):
|
| 83 |
pass
|
| 84 |
|
|
|
|
| 70 |
|
| 71 |
# Buttons to run descent step and reset
|
| 72 |
col1, col2 = st.columns([1, 1])
|
| 73 |
+
with col1:
|
| 74 |
if st.button("🔄 Run Descent Step"):
|
| 75 |
grad = derivative(func_input, st.session_state.x)
|
| 76 |
st.session_state.x -= learning_rate * grad
|
|
|
|
| 78 |
st.session_state.x_vals.append(st.session_state.x)
|
| 79 |
st.session_state.y_vals.append(safe_eval(func_input, st.session_state.x))
|
| 80 |
|
| 81 |
+
with col2:
|
| 82 |
if st.button("🔄 Reset", on_click=reset_state):
|
| 83 |
pass
|
| 84 |
|