Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,24 +12,6 @@ def update_params():
|
|
12 |
#st.experimental_set_query_params(option=st.session_state.query)
|
13 |
except ValueError:
|
14 |
pass
|
15 |
-
|
16 |
-
# RADIO BUTTON SET PERSIST
|
17 |
-
# radio button persistance - plan is to hydrate when selected and change url along with textbox and search
|
18 |
-
options = ["artificial intelligence", "robot", "software", "AI", "VR", "medicine", "alien", "psychology", "fantasy", "cyber", "genomics", "animation", "sci-fi"] # these options come from my research interests blended with keywords across film genres
|
19 |
-
|
20 |
-
query_params = st.experimental_get_query_params()
|
21 |
-
ix = 0
|
22 |
-
if query_params:
|
23 |
-
try:
|
24 |
-
q0 = query_params['query'][0]
|
25 |
-
ix = options.index(q0)
|
26 |
-
except ValueError:
|
27 |
-
pass
|
28 |
-
selected_option = st.radio(
|
29 |
-
"Param", options, index=ix, key="query", on_change=update_params
|
30 |
-
)
|
31 |
-
st.experimental_set_query_params(option=selected_option)
|
32 |
-
|
33 |
|
34 |
@st.cache(
|
35 |
show_spinner=False,
|
|
|
12 |
#st.experimental_set_query_params(option=st.session_state.query)
|
13 |
except ValueError:
|
14 |
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
@st.cache(
|
17 |
show_spinner=False,
|