ECUiVADE commited on
Commit
62a7c65
1 Parent(s): 29b4943

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -219,10 +219,9 @@ def submit_user_info(name,occupation,yearsofexp,ethnicity,gender,age):
219
  else:
220
  return "Enter ALL the details to start chatting"
221
 
222
- def start_chat_button(agree_to_radio):
223
 
224
- if agree_to_radio:
225
- agree_status = agree_to_radio
226
  chat_log_name = f'chat_log_for_{unique_id}_{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.json'
227
  return f"You can start chatting now"
228
  else:
@@ -268,10 +267,10 @@ with gr.Blocks() as app:
268
  #submit_info = gr.Button("Submit")
269
  start_chat_button = gr.Button("Start Chat with Chatlog")
270
  status_textbox = gr.Textbox(interactive = False)
271
- agree_to_radio = gr.Checkbox(label="I have read and understand the terms and conditions.")
272
- print(agree_to_radio)
273
  #submit_info.click(submit_user_info, inputs=[name, occupation, yearsofexp, ethnicity, gender, age], outputs=[status_textbox])
274
- start_chat_button.click(submit_user_info, inputs=[agree_to_radio], outputs=[status_textbox])
275
 
276
  with gr.Tab("Chat Bot"):
277
  chatbot = gr.Chatbot()
 
219
  else:
220
  return "Enter ALL the details to start chatting"
221
 
222
+ def start_chat_button():
223
 
224
+ if agree_status:
 
225
  chat_log_name = f'chat_log_for_{unique_id}_{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}.json'
226
  return f"You can start chatting now"
227
  else:
 
267
  #submit_info = gr.Button("Submit")
268
  start_chat_button = gr.Button("Start Chat with Chatlog")
269
  status_textbox = gr.Textbox(interactive = False)
270
+ agree_status = gr.Checkbox(label="I have read and understand the terms and conditions.")
271
+ print(agree_status)
272
  #submit_info.click(submit_user_info, inputs=[name, occupation, yearsofexp, ethnicity, gender, age], outputs=[status_textbox])
273
+ start_chat_button.click(submit_user_info, inputs=[], outputs=[status_textbox])
274
 
275
  with gr.Tab("Chat Bot"):
276
  chatbot = gr.Chatbot()