Update app.py
Browse files
app.py
CHANGED
|
@@ -77,6 +77,10 @@ st.markdown(
|
|
| 77 |
padding: 10px 20px;
|
| 78 |
font-size: 18px;
|
| 79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
</style>
|
| 81 |
""",
|
| 82 |
unsafe_allow_html=True,
|
|
@@ -107,13 +111,13 @@ with col1:
|
|
| 107 |
step=0.01,
|
| 108 |
key="learning_rate"
|
| 109 |
)
|
| 110 |
-
if st.button("Setup", key="setup_button", help="Click to reset the function and starting point",
|
| 111 |
use_container_width=True,
|
| 112 |
on_click=reset_state,
|
| 113 |
args=(),
|
| 114 |
kwargs={}):
|
| 115 |
pass
|
| 116 |
-
if st.button("Next Iteration", key="next_iteration_button", help="Click to perform the next gradient descent iteration",
|
| 117 |
use_container_width=True):
|
| 118 |
try:
|
| 119 |
grad = derivative(st.session_state.func_input, st.session_state.x)
|
|
@@ -181,7 +185,7 @@ with col2:
|
|
| 181 |
zerolinewidth=2,
|
| 182 |
showgrid=True,
|
| 183 |
gridcolor="lightgray",
|
| 184 |
-
range=[
|
| 185 |
color="white"
|
| 186 |
),
|
| 187 |
plot_bgcolor="black",
|
|
|
|
| 77 |
padding: 10px 20px;
|
| 78 |
font-size: 18px;
|
| 79 |
}
|
| 80 |
+
.button-style:active, .button-style:hover {
|
| 81 |
+
background-color: black;
|
| 82 |
+
color: #FF1493;
|
| 83 |
+
}
|
| 84 |
</style>
|
| 85 |
""",
|
| 86 |
unsafe_allow_html=True,
|
|
|
|
| 111 |
step=0.01,
|
| 112 |
key="learning_rate"
|
| 113 |
)
|
| 114 |
+
if st.button("🛠️ Setup", key="setup_button", help="Click to reset the function and starting point",
|
| 115 |
use_container_width=True,
|
| 116 |
on_click=reset_state,
|
| 117 |
args=(),
|
| 118 |
kwargs={}):
|
| 119 |
pass
|
| 120 |
+
if st.button("🔄 Next Iteration", key="next_iteration_button", help="Click to perform the next gradient descent iteration",
|
| 121 |
use_container_width=True):
|
| 122 |
try:
|
| 123 |
grad = derivative(st.session_state.func_input, st.session_state.x)
|
|
|
|
| 185 |
zerolinewidth=2,
|
| 186 |
showgrid=True,
|
| 187 |
gridcolor="lightgray",
|
| 188 |
+
range=[-120, 120], # Adjusted y-axis range
|
| 189 |
color="white"
|
| 190 |
),
|
| 191 |
plot_bgcolor="black",
|