Update app.py
Browse files
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(
|
223 |
|
224 |
-
if
|
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 |
-
|
272 |
-
print(
|
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=[
|
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()
|