ECUiVADE commited on
Commit
e8b5fe1
1 Parent(s): 1095084

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -13
app.py CHANGED
@@ -207,7 +207,7 @@ class ChatbotAPP:
207
 
208
  else:
209
  temp_history=[]
210
- output = "Did you forget to Agree to the Terms and Conditions?"
211
  temp_history.append((prompt,output))
212
  return temp_history
213
 
@@ -222,7 +222,7 @@ class ChatbotAPP:
222
  self.update_chatlog_name()
223
  return f"You can start chatting now."
224
  else:
225
- return "You must agree to the terms and conditions to proceed"
226
 
227
  def reset_chat_interface(self): # Method to reset the chat interface
228
 
@@ -291,27 +291,30 @@ class ChatbotAPP:
291
  #gender = gr.Dropdown(choices=["Male", "Female", "Other", "Prefer Not To Say"], label="Gender")
292
  #age = gr.Textbox(label="Age")
293
  #submit_info = gr.Button("Submit")
294
- gr.Markdown("## Terms and Conditions")
295
  gr.Markdown("""
296
- Before Talking with Barry, please read the following terms and conditions carefully:
297
-
298
- - **Data Collection**: Our chatbot collects chat logs for the purpose of improving our services and user experience.
299
- - **Privacy**: We ensure the confidentiality and security of your data, in line with our privacy policy.
300
- - **Survey**: At the end of the chat session, you will be asked to participate in a short survey to gather feedback about your experience.
301
- - **Consent**: By checking the box below and initiating the chat, you agree to these terms and the collection of chat logs, and consent to take part in the survey upon completing your session.
 
 
 
302
 
303
- Please check the box below to acknowledge your agreement and proceed.
304
  """)
305
- agree_status = gr.Checkbox(label="I have read and understand the terms and conditions.")
306
  status_label = gr.Markdown()
307
- start_chat_button = gr.Button("Agree to Terms and Conditions")
308
  #submit_info.click(submit_user_info, inputs=[name, occupation, yearsofexp, ethnicity, gender, age], outputs=[status_textbox])
309
  start_chat_button.click(self.start_chat_button_fn, inputs=[agree_status], outputs=[status_label])
310
  #status_textbox = gr.Textbox(interactive = False)
311
 
312
  with gr.Tab("Barry"):
313
  chatbot = gr.Chatbot(show_label=True,label="Chat With Barry")
314
- msg = gr.Textbox(label="Type your message to Barry")
315
  send = gr.Button("Send")
316
  clear = gr.Button("Clear Chat")
317
  send.click(self.generate, inputs=[msg], outputs=chatbot)
 
207
 
208
  else:
209
  temp_history=[]
210
+ output = "Did you forget to read the Instructions?"
211
  temp_history.append((prompt,output))
212
  return temp_history
213
 
 
222
  self.update_chatlog_name()
223
  return f"You can start chatting now."
224
  else:
225
+ return "Read the Instructions"
226
 
227
  def reset_chat_interface(self): # Method to reset the chat interface
228
 
 
291
  #gender = gr.Dropdown(choices=["Male", "Female", "Other", "Prefer Not To Say"], label="Gender")
292
  #age = gr.Textbox(label="Age")
293
  #submit_info = gr.Button("Submit")
294
+ gr.Markdown("## Instructions")
295
  gr.Markdown("""
296
+ Before Talking with Barry, please read the following instructions carefully:
297
+
298
+ - Please ensure that you have read and agreed to the data collection policy provided as part of your agreement to participate as logging and collection of interactions is automated and unidentifiable.
299
+ - Interactions with the chatbot require you to type your response and press the button to submit, you cannot press enter.
300
+ - There is a tab at the top to reset the chat bot for more interactions, please ensure to reset after filling out the survey and before starting your next conversation.
301
+ - Select the 'Barry' tab at the top to chat with Barry
302
+ - The clear chat button is only for if the chat window gets bugged, you should not have to use it unless you cannot see messages or it is printing strange messages.
303
+ - After clicking begin, depending on your browser you may need to manually navigate to the Barry Tab.
304
+ - Remember to note your Unique Identifier at the top for your feedback survey.
305
 
306
+ Please check the box below to proceed.
307
  """)
308
+ agree_status = gr.Checkbox(label="I have read and understand the instructions.")
309
  status_label = gr.Markdown()
310
+ start_chat_button = gr.Button("Begin")
311
  #submit_info.click(submit_user_info, inputs=[name, occupation, yearsofexp, ethnicity, gender, age], outputs=[status_textbox])
312
  start_chat_button.click(self.start_chat_button_fn, inputs=[agree_status], outputs=[status_label])
313
  #status_textbox = gr.Textbox(interactive = False)
314
 
315
  with gr.Tab("Barry"):
316
  chatbot = gr.Chatbot(show_label=True,label="Chat With Barry")
317
+ msg = gr.Textbox(label="Hello")
318
  send = gr.Button("Send")
319
  clear = gr.Button("Clear Chat")
320
  send.click(self.generate, inputs=[msg], outputs=chatbot)