Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,16 +55,6 @@ def update_params():
|
|
| 55 |
#except ValueError:
|
| 56 |
# pass
|
| 57 |
|
| 58 |
-
# Text Input, check the query params set the text input to query value if in session
|
| 59 |
-
try:
|
| 60 |
-
query_params = st.experimental_get_query_params()
|
| 61 |
-
query_option = query_params['query'][0] #throws an exception when visiting http://host:port
|
| 62 |
-
option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option))
|
| 63 |
-
except: # catch exception and set query param to predefined value
|
| 64 |
-
st.experimental_set_query_params(query="Genomics") # set default
|
| 65 |
-
query_params = st.experimental_get_query_params()
|
| 66 |
-
query_option = query_params['query'][0]
|
| 67 |
-
|
| 68 |
|
| 69 |
# radio button persistance - plan is to hydrate when selected and change url along with textbox and search
|
| 70 |
options = ["ai", "nlp", "iot", "vr", "genomics", "graph", "cognitive"]
|
|
@@ -83,6 +73,16 @@ selected_option = st.radio(
|
|
| 83 |
# set query param based on selection
|
| 84 |
st.experimental_set_query_params(option=selected_option)
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
|
| 88 |
|
|
|
|
| 55 |
#except ValueError:
|
| 56 |
# pass
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
# radio button persistance - plan is to hydrate when selected and change url along with textbox and search
|
| 60 |
options = ["ai", "nlp", "iot", "vr", "genomics", "graph", "cognitive"]
|
|
|
|
| 73 |
# set query param based on selection
|
| 74 |
st.experimental_set_query_params(option=selected_option)
|
| 75 |
|
| 76 |
+
# Text Input, check the query params set the text input to query value if in session
|
| 77 |
+
try:
|
| 78 |
+
query_params = st.experimental_get_query_params()
|
| 79 |
+
query_option = query_params['query'][0] #throws an exception when visiting http://host:port
|
| 80 |
+
option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option))
|
| 81 |
+
except: # catch exception and set query param to predefined value
|
| 82 |
+
st.experimental_set_query_params(query="Genomics") # set default
|
| 83 |
+
query_params = st.experimental_get_query_params()
|
| 84 |
+
query_option = query_params['query'][0]
|
| 85 |
+
|
| 86 |
|
| 87 |
|
| 88 |
|