Mdupler commited on
Commit
fc9e545
·
verified ·
1 Parent(s): 42ddaad

Add app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -104,7 +104,7 @@ def submission(survey_data):
104
  total_number_pages = 2
105
  placeholder_buttons = None
106
 
107
- Q1_radio_options = ["stone","bapple"]
108
 
109
 
110
  # Function that records radio element changes
@@ -140,14 +140,14 @@ if st.session_state["current_page"] == 1:
140
 
141
  st.markdown("""<p class="big-font"></p>""", unsafe_allow_html=True)
142
 
143
- st.multiselect(label = "whats ur favorite beer",
144
- default = None if st.session_state["Q1"] == None else st.session_state["Q1"],
145
  options = Q1_radio_options,
146
- key = 'Q1_multi',
147
- on_change = multi_change,
148
- args = (Q1_radio_options, "Q1", "Q1_multi",))
 
149
 
150
- st.markdown("""<style> div[class*="stMulti"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
151
 
152
 
153
  placeholder = st.empty()
@@ -173,7 +173,7 @@ elif st.session_state["current_page"] == 2: # Last Page
173
  with st.spinner(r"$\textsf{\normalsize Storing data on IPFS and Ethereum. This operation might take a few minutes. Please wait to receive your confirmation code!}$"):
174
  try:
175
  response = {
176
- "Q1": st.session_state["Q1"],
177
  }
178
  submission(response)
179
  except Exception as e:
 
104
  total_number_pages = 2
105
  placeholder_buttons = None
106
 
107
+ Q1_radio_options = ["Yippee","Oh No"]
108
 
109
 
110
  # Function that records radio element changes
 
140
 
141
  st.markdown("""<p class="big-font"></p>""", unsafe_allow_html=True)
142
 
143
+ st.radio(label = "Test Survey Question",
 
144
  options = Q1_radio_options,
145
+ index = None if st.session_state["Q1"] == None else st.session_state["Q1"],
146
+ key = 'Q1_radio',
147
+ on_change = radio_change,
148
+ args = (Q1_radio_options, "Q1", "Q1_radio",))
149
 
150
+ st.markdown("""<style> div[class*="stRadio"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
151
 
152
 
153
  placeholder = st.empty()
 
173
  with st.spinner(r"$\textsf{\normalsize Storing data on IPFS and Ethereum. This operation might take a few minutes. Please wait to receive your confirmation code!}$"):
174
  try:
175
  response = {
176
+ "Q1": Q1_radio_options[st.session_state["Q1"]],
177
  }
178
  submission(response)
179
  except Exception as e: