DragandDropGroup commited on
Commit
6a821ea
·
verified ·
1 Parent(s): d2fdcc0

Add app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -7,7 +7,6 @@ total_number_pages = 4
7
  placeholder_buttons = None
8
 
9
  Q1_radio_options = ["Pizza","Burgers","Pasta","Hot Dogs"]
10
- Q2_radio_options = ["Water","Soda","Coffee","Tea"]
11
  Q3_radio_options = ["Yes","No"]
12
  Q4_radio_options = ["N/A", "Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"]
13
 
@@ -47,7 +46,7 @@ if "current_page" not in st.session_state:
47
  # Page 1; Video
48
  if st.session_state["current_page"] == 1:
49
 
50
- st.markdown("""<p class="big-font">This is a description for my survey</p>""", unsafe_allow_html=True)
51
 
52
  st.radio(label = "What is your favorite food?",
53
  options = Q1_radio_options,
@@ -59,14 +58,13 @@ if st.session_state["current_page"] == 1:
59
  st.markdown("""<style> div[class*="stRadio"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
60
 
61
 
62
- st.multiselect(label = "Select all of the drinks that you like.",
63
- default = None if st.session_state["Q2"] == None else st.session_state["Q2"],
64
- options = Q2_radio_options,
65
- key = 'Q2_multi',
66
- on_change = multi_change,
67
- args = (Q2_radio_options, "Q2", "Q2_multi",))
68
 
69
- st.markdown("""<style> div[class*="stMulti"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
70
 
71
 
72
  placeholder = st.empty()
@@ -90,7 +88,7 @@ if st.session_state["current_page"] == 1:
90
  elif st.session_state["current_page"] == 2:
91
 
92
  st.video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
93
- st.markdown("""<p style='font-size:18px;'>Get rick rolled!</p>""", unsafe_allow_html=True)
94
  st.selectbox(label = "Was that a good joke?",
95
  options = Q3_radio_options,
96
  index = None if st.session_state["Q3"] == None else st.session_state["Q3"],
@@ -137,7 +135,7 @@ elif st.session_state["current_page"] == 3:
137
 
138
  if st.session_state["Q5"] == None:
139
  st.session_state["Q5"] = 50
140
- st.slider(label="How happy are you today?",min_value=0,max_value=100,
141
  value= st.session_state["Q5"],
142
  key = "Q5_slider",
143
  on_change = answer_change,
 
7
  placeholder_buttons = None
8
 
9
  Q1_radio_options = ["Pizza","Burgers","Pasta","Hot Dogs"]
 
10
  Q3_radio_options = ["Yes","No"]
11
  Q4_radio_options = ["N/A", "Strongly Disagree", "Disagree", "Neutral", "Agree", "Strongly Agree"]
12
 
 
46
  # Page 1; Video
47
  if st.session_state["current_page"] == 1:
48
 
49
+ st.markdown("""<p class="big-font">This is a test survey</p>""", unsafe_allow_html=True)
50
 
51
  st.radio(label = "What is your favorite food?",
52
  options = Q1_radio_options,
 
58
  st.markdown("""<style> div[class*="stRadio"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
59
 
60
 
61
+ st.text_area(label = "How is your day?",
62
+ value= "" if st.session_state["Q2"] == None else st.session_state["Q2"],
63
+ key = 'Q2_text',
64
+ on_change = answer_change,
65
+ args = ( "Q2", "Q2_text",))
 
66
 
67
+ st.markdown("""<style> div[class*="stText"] > label > div[data-testid="stMarkdownContainer"] > p {font-size: 18px;}</style> <br><br>""", unsafe_allow_html=True)
68
 
69
 
70
  placeholder = st.empty()
 
88
  elif st.session_state["current_page"] == 2:
89
 
90
  st.video("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
91
+ st.markdown("""<p style='font-size:18px;'>Get RickRolled!</p>""", unsafe_allow_html=True)
92
  st.selectbox(label = "Was that a good joke?",
93
  options = Q3_radio_options,
94
  index = None if st.session_state["Q3"] == None else st.session_state["Q3"],
 
135
 
136
  if st.session_state["Q5"] == None:
137
  st.session_state["Q5"] = 50
138
+ st.slider(label="How much do you enjoy food?",min_value=0,max_value=100,
139
  value= st.session_state["Q5"],
140
  key = "Q5_slider",
141
  on_change = answer_change,