ans123 commited on
Commit
144fffe
·
verified ·
1 Parent(s): f301c18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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, "title"])
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