Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -20,6 +20,16 @@ def update_params():
|
|
20 |
pass
|
21 |
|
22 |
# RADIO BUTTON SET PERSIST
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
selected_option = st.radio(
|
24 |
"Param", options, index=ix, key="query", on_change=update_params
|
25 |
)
|
@@ -39,16 +49,7 @@ except: # catch exception and set query param to predefined value
|
|
39 |
print("Error cant set after init")
|
40 |
#if 'query' not in st.session_state:
|
41 |
|
42 |
-
|
43 |
-
options = ["ai", "nlp", "iot", "vr", "genomics", "graph", "cognitive"]
|
44 |
-
query_params = st.experimental_get_query_params()
|
45 |
-
ix = 0
|
46 |
-
if query_params:
|
47 |
-
try:
|
48 |
-
q0 = query_params['query'][0]
|
49 |
-
ix = options.index(q0)
|
50 |
-
except ValueError:
|
51 |
-
pass
|
52 |
|
53 |
|
54 |
|
20 |
pass
|
21 |
|
22 |
# RADIO BUTTON SET PERSIST
|
23 |
+
# radio button persistance - plan is to hydrate when selected and change url along with textbox and search
|
24 |
+
options = ["ai", "nlp", "iot", "vr", "genomics", "graph", "cognitive"]
|
25 |
+
query_params = st.experimental_get_query_params()
|
26 |
+
ix = 0
|
27 |
+
if query_params:
|
28 |
+
try:
|
29 |
+
q0 = query_params['query'][0]
|
30 |
+
ix = options.index(q0)
|
31 |
+
except ValueError:
|
32 |
+
pass
|
33 |
selected_option = st.radio(
|
34 |
"Param", options, index=ix, key="query", on_change=update_params
|
35 |
)
|
49 |
print("Error cant set after init")
|
50 |
#if 'query' not in st.session_state:
|
51 |
|
52 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
|
55 |
|