Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,11 +3,11 @@ import numpy as np
|
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
|
| 5 |
# Check page parameters for navigation
|
| 6 |
-
params = st.
|
| 7 |
if "page" not in params or params["page"] != ["tool"]:
|
| 8 |
st.warning("⚠️ Please navigate through the Home page!")
|
| 9 |
if st.button("🏠 Go to Home"):
|
| 10 |
-
st.
|
| 11 |
st.stop()
|
| 12 |
|
| 13 |
# Safe function evaluation
|
|
@@ -135,4 +135,4 @@ with col2:
|
|
| 135 |
col6.success(f"✅ Current x: {st.session_state.x:.4f}, Current f(x): {st.session_state.y_vals[-1]:.4f}")
|
| 136 |
|
| 137 |
if st.button("🏠 Return to Home"):
|
| 138 |
-
st.
|
|
|
|
| 3 |
import plotly.graph_objects as go
|
| 4 |
|
| 5 |
# Check page parameters for navigation
|
| 6 |
+
params = st.query_params
|
| 7 |
if "page" not in params or params["page"] != ["tool"]:
|
| 8 |
st.warning("⚠️ Please navigate through the Home page!")
|
| 9 |
if st.button("🏠 Go to Home"):
|
| 10 |
+
st.query_params.update({"page": "home"})
|
| 11 |
st.stop()
|
| 12 |
|
| 13 |
# Safe function evaluation
|
|
|
|
| 135 |
col6.success(f"✅ Current x: {st.session_state.x:.4f}, Current f(x): {st.session_state.y_vals[-1]:.4f}")
|
| 136 |
|
| 137 |
if st.button("🏠 Return to Home"):
|
| 138 |
+
st.query_params.update({"page": "home"})
|