Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ system_message = {
|
|
13 |
|
14 |
# Function to reset the chat
|
15 |
def reset_chat():
|
16 |
-
return [], "New Chat"
|
17 |
|
18 |
# Function to handle the questionnaire submission
|
19 |
def submit_questionnaire(name, age, location, gender, ethnicity, height, weight,
|
@@ -104,7 +104,7 @@ with gr.Blocks() as demo:
|
|
104 |
submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
|
105 |
style_preference, color_palette, everyday_style], outputs=output_message)
|
106 |
|
107 |
-
reset_btn.click(reset_chat, outputs=[chatbox,
|
108 |
user_input.submit(chat, inputs=[user_input, chatbox], outputs=[chatbox, user_input])
|
109 |
|
110 |
# Run the app
|
|
|
13 |
|
14 |
# Function to reset the chat
|
15 |
def reset_chat():
|
16 |
+
return [], "New Chat" # Returns an empty chat history and a new title
|
17 |
|
18 |
# Function to handle the questionnaire submission
|
19 |
def submit_questionnaire(name, age, location, gender, ethnicity, height, weight,
|
|
|
104 |
submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
|
105 |
style_preference, color_palette, everyday_style], outputs=output_message)
|
106 |
|
107 |
+
reset_btn.click(reset_chat, outputs=[chatbox, output_message]) # Corrected outputs
|
108 |
user_input.submit(chat, inputs=[user_input, chatbox], outputs=[chatbox, user_input])
|
109 |
|
110 |
# Run the app
|