awacke1 commited on
Commit
5391edd
β€’
1 Parent(s): ee19efa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -35,16 +35,6 @@ except: # catch exception and set query param to predefined value
35
  #if 'query' not in st.session_state:
36
 
37
 
38
- # Text Input, check the query params set the text input to query value if in session
39
- try:
40
- query_params = st.experimental_get_query_params()
41
- query_option = query_params['query'][0] #throws an exception when visiting http://host:port
42
- option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option))
43
- except: # catch exception and set query param to predefined value
44
- st.experimental_set_query_params(query="Genomics") # set default
45
- query_params = st.experimental_get_query_params()
46
- query_option = query_params['query'][0]
47
-
48
 
49
 
50
  # radio button persistance - plan is to hydrate when selected and change url along with textbox and search
@@ -63,6 +53,16 @@ selected_option = st.radio(
63
  st.experimental_set_query_params(option=selected_option)
64
 
65
 
 
 
 
 
 
 
 
 
 
 
66
 
67
 
68
 
 
35
  #if 'query' not in st.session_state:
36
 
37
 
 
 
 
 
 
 
 
 
 
 
38
 
39
 
40
  # radio button persistance - plan is to hydrate when selected and change url along with textbox and search
 
53
  st.experimental_set_query_params(option=selected_option)
54
 
55
 
56
+ # Text Input, check the query params set the text input to query value if in session
57
+ try:
58
+ query_params = st.experimental_get_query_params()
59
+ query_option = query_params['query'][0] #throws an exception when visiting http://host:port
60
+ option_selected = st.sidebar.selectbox('Pick option', options, index=options.index(query_option))
61
+ except: # catch exception and set query param to predefined value
62
+ st.experimental_set_query_params(query="Genomics") # set default
63
+ query_params = st.experimental_get_query_params()
64
+ query_option = query_params['query'][0]
65
+
66
 
67
 
68