anastaa3 commited on
Commit
eeb5f1d
·
verified ·
1 Parent(s): 86d45df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -15,7 +15,12 @@ Q9_radio_options = ["IDK","Of Course","STFU!!!!!","Inner demons"]
15
 
16
  # Function that records radio element changes
17
  def radio_change(element, state, key):
18
- st.write(st.session_state[key][0])
 
 
 
 
 
19
 
20
  # Function that disables the last button while data is uploaded to IPFS
21
  def button_disable():
@@ -89,7 +94,7 @@ elif st.session_state["current_page"] == 2:
89
  options = Q3_radio_options,
90
  default = None if st.session_state["Q3"] == None else st.session_state["Q3"],
91
  key = 'Q3_multi',
92
- on_change = radio_change,
93
  args = (Q3_radio_options, "Q3", "Q3_multi",))
94
 
95
  # The code below changes the font size of the above radio's label.
 
15
 
16
  # Function that records radio element changes
17
  def radio_change(element, state, key):
18
+ st.session_state[state] = element.index(st.session_state[key]) # Setting previously selected option
19
+
20
+ # Function that records radio element changes
21
+ def multi_change(element, state, key):
22
+ st.session_state[state] = element.index(st.session_state[key][0]) # Setting previously selected option
23
+
24
 
25
  # Function that disables the last button while data is uploaded to IPFS
26
  def button_disable():
 
94
  options = Q3_radio_options,
95
  default = None if st.session_state["Q3"] == None else st.session_state["Q3"],
96
  key = 'Q3_multi',
97
+ on_change = multi_change,
98
  args = (Q3_radio_options, "Q3", "Q3_multi",))
99
 
100
  # The code below changes the font size of the above radio's label.