Update home.py
Browse files
home.py
CHANGED
|
@@ -3,11 +3,17 @@ import streamlit as st
|
|
| 3 |
# Page configuration
|
| 4 |
st.set_page_config(page_title="Home", layout="centered")
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
st.
|
| 8 |
-
st.
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
# Page configuration
|
| 4 |
st.set_page_config(page_title="Home", layout="centered")
|
| 5 |
|
| 6 |
+
# Check query parameters using st.query_params
|
| 7 |
+
params = st.experimental_get_query_params() # Replace this
|
| 8 |
+
params = st.query_params # New approach
|
| 9 |
+
|
| 10 |
+
if "page" in params and params["page"][0] == "playground":
|
| 11 |
+
import app # This will display the `app.py` page
|
| 12 |
+
else:
|
| 13 |
+
# Title and description
|
| 14 |
+
st.title("Welcome to the Gradient Descent App!")
|
| 15 |
+
st.write("Click the button below to explore the playground.")
|
| 16 |
+
|
| 17 |
+
# Button to navigate to the playground
|
| 18 |
+
if st.button("Go to Playground"):
|
| 19 |
+
st.experimental_set_query_params(page="playground")
|