Spaces:
Sleeping
Sleeping
testing
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ row1_1, row1_2 = st.columns((2, 3))
|
|
114 |
# E.G. https://share.streamlit.io/streamlit/demo-uber-nyc-pickups/main?pickup_hour=2
|
115 |
if not st.session_state.get("url_synced", False):
|
116 |
try:
|
117 |
-
pickup_hour = int(st.query_params
|
118 |
st.session_state["pickup_hour"] = pickup_hour
|
119 |
st.session_state["url_synced"] = True
|
120 |
except KeyError:
|
@@ -124,7 +124,7 @@ if not st.session_state.get("url_synced", False):
|
|
124 |
# IF THE SLIDER CHANGES, UPDATE THE QUERY PARAM
|
125 |
def update_query_params():
|
126 |
hour_selected = st.session_state["pickup_hour"]
|
127 |
-
st.query_params
|
128 |
|
129 |
|
130 |
with row1_1:
|
|
|
114 |
# E.G. https://share.streamlit.io/streamlit/demo-uber-nyc-pickups/main?pickup_hour=2
|
115 |
if not st.session_state.get("url_synced", False):
|
116 |
try:
|
117 |
+
pickup_hour = int(st.query_params["pickup_hour"][0])
|
118 |
st.session_state["pickup_hour"] = pickup_hour
|
119 |
st.session_state["url_synced"] = True
|
120 |
except KeyError:
|
|
|
124 |
# IF THE SLIDER CHANGES, UPDATE THE QUERY PARAM
|
125 |
def update_query_params():
|
126 |
hour_selected = st.session_state["pickup_hour"]
|
127 |
+
st.query_params["pickup_hour"]=hour_selected
|
128 |
|
129 |
|
130 |
with row1_1:
|