Yara Kyrychenko commited on
Commit
1e33da4
Β·
1 Parent(s): 1b5f7d6

upd submit interaction and del code

Browse files
Files changed (1) hide show
  1. app.py +9 -13
app.py CHANGED
@@ -114,17 +114,15 @@ with st.sidebar:
114
 
115
  ❗ Do not use AI tools to generate your responses; write them yourself.
116
 
117
- ⚠️ You must respond **at least 5 times** before you will see a *Finish* button. You can continue before submitting, but **you must finish and enter your completion code into the survey to recieve compensation**.
118
 
119
  ❗ If you encounter any technical issues, please let us know. It might sometimes take 30 seconds or more to generate a response, so please be patient.
120
 
121
- {"β˜‘" if st.session_state.inserted > 1 else "☐"} **Step 3. Use the *Finish* button to get your completion code**
122
-
123
- ⚠️ Do not forget to copy & paste your completion code!
124
 
125
  β†Ί You can always return to this panel by clicking the arrow on the top left.
126
 
127
- {"πŸŽ‰ **All done! Please enter your code in the survye and press *Next*.**" if st.session_state.inserted > 1 else ""}
128
  """)
129
  if st.session_state.gotit == False or st.session_state.submitted == False:
130
  st.session_state.gotit = st.button("Let's start!", key=None, help=None, use_container_width=True)
@@ -206,18 +204,16 @@ elif st.session_state.submitted == False:
206
  pass
207
 
208
  elif st.session_state.inserted > 1:
209
- st.markdown("## Copy your code!")
210
- st.markdown('**Your completion code is:**')
211
- st.markdown(f'## {st.session_state.user_id}')
212
- st.markdown('**Please copy the code and enter it into the survey field below.**')
213
 
214
  elif st.query_params["p"] == "n":
215
- st.markdown("""**You have not been selected to have a conversation with the chatbot.**
216
- Please press *Finish* to get your completion code.
217
  """)
218
  columns = st.columns((1,1,1))
219
  with columns[2]:
220
- if st.button("Finish",use_container_width=True):
221
  keys = ["inserted", "messages", "convo_start_time"]
222
 
223
  st.session_state.user_data.update({key: st.session_state[key] for key in keys})
@@ -271,7 +267,7 @@ elif prompt := st.chat_input("Ask a question about climate action..."):
271
  if len(st.session_state.messages) > 10 or st.session_state.max_messages == len(st.session_state.messages):
272
  columns = st.columns((1,1,1))
273
  with columns[2]:
274
- if st.button("Finish",use_container_width=True):
275
  keys = ["inserted", "messages", "convo_start_time"]
276
 
277
  st.session_state.user_data.update({key: st.session_state[key] for key in keys})
 
114
 
115
  ❗ Do not use AI tools to generate your responses; write them yourself.
116
 
117
+ ⚠️ You must respond **at least 5 times** before you will see a *Submit Interaction* button. You can continue before submitting, but **you must click *Submit Interaction* to receive compensation**.
118
 
119
  ❗ If you encounter any technical issues, please let us know. It might sometimes take 30 seconds or more to generate a response, so please be patient.
120
 
121
+ {"β˜‘" if st.session_state.inserted > 1 else "☐"} **Step 3. Press the *Submit Interaction* button**
 
 
122
 
123
  β†Ί You can always return to this panel by clicking the arrow on the top left.
124
 
125
+ {"πŸŽ‰ **All done! Please press *Next* in the survey.**" if st.session_state.inserted > 1 else ""}
126
  """)
127
  if st.session_state.gotit == False or st.session_state.submitted == False:
128
  st.session_state.gotit = st.button("Let's start!", key=None, help=None, use_container_width=True)
 
204
  pass
205
 
206
  elif st.session_state.inserted > 1:
207
+ st.markdown("## Please press *Next* in the survey to proceed.")
208
+ st.markdown('❗ **This is not the end of the study.**')
 
 
209
 
210
  elif st.query_params["p"] == "n":
211
+ st.markdown("""**You have (randomly) not been selected to have a conversation with the chatbot.**
212
+ Please press *Submit Interaction* to get your completion code.
213
  """)
214
  columns = st.columns((1,1,1))
215
  with columns[2]:
216
+ if st.button("Submit Interaction",use_container_width=True):
217
  keys = ["inserted", "messages", "convo_start_time"]
218
 
219
  st.session_state.user_data.update({key: st.session_state[key] for key in keys})
 
267
  if len(st.session_state.messages) > 10 or st.session_state.max_messages == len(st.session_state.messages):
268
  columns = st.columns((1,1,1))
269
  with columns[2]:
270
+ if st.button("Submit Interaction",use_container_width=True, type="primary"):
271
  keys = ["inserted", "messages", "convo_start_time"]
272
 
273
  st.session_state.user_data.update({key: st.session_state[key] for key in keys})