ans123 commited on
Commit
740ea71
·
verified ·
1 Parent(s): 1d9bd0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -165,11 +165,11 @@ with gr.Blocks() as demo:
165
 
166
  # More preferences (add all as needed)
167
 
168
- chatbox = gr.Chatbot(label="Chat History")
169
  user_input = gr.Textbox(label="Ask anything about fashion...", placeholder="Type your message here...")
170
 
171
  # Reset chat functionality
172
- reset_btn.click(reset_chat, outputs=[chatbox, "title"])
173
 
174
  # Submit questionnaire functionality
175
  submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
@@ -179,7 +179,7 @@ with gr.Blocks() as demo:
179
  material_preference], outputs="text")
180
 
181
  # Chat functionality
182
- user_input.submit(chat, inputs=[user_input, chatbox, name, age, location, gender, ethnicity, height, weight],
183
- outputs=[chatbox, ""])
184
 
 
185
  demo.launch()
 
165
 
166
  # More preferences (add all as needed)
167
 
168
+ chatbox = gr.Chatbot(label="Chat History", type='messages')
169
  user_input = gr.Textbox(label="Ask anything about fashion...", placeholder="Type your message here...")
170
 
171
  # Reset chat functionality
172
+ reset_btn.click(reset_chat, outputs=[chatbox, chatbox])
173
 
174
  # Submit questionnaire functionality
175
  submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
 
179
  material_preference], outputs="text")
180
 
181
  # Chat functionality
182
+ user_input.submit(chat, inputs=[user_input, chatbox, name, age, location, gender, ethnicity, height, weight], outputs=[chatbox, user_input])
 
183
 
184
+ # Run the app
185
  demo.launch()