Update app.py
Browse files
app.py
CHANGED
@@ -196,10 +196,11 @@ with gr.Blocks() as demo:
|
|
196 |
ai_improvements = gr.Radio(label="How can AI improve?", choices=["More Options", "Better Quality", "Faster Suggestions"])
|
197 |
|
198 |
# Chat functionality
|
199 |
-
chatbox = gr.Chatbot(
|
200 |
user_input = gr.Textbox(label="Your Message", placeholder="Type your message here...")
|
201 |
|
202 |
# Connect the buttons to their respective functions
|
|
|
203 |
submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
|
204 |
style_preference, color_palette, everyday_style,
|
205 |
preferred_prints, season_preference, outfit_priority,
|
@@ -216,7 +217,7 @@ with gr.Blocks() as demo:
|
|
216 |
ai_usage_frequency, ai_match_preferences,
|
217 |
ai_recommendation, ai_understanding_style,
|
218 |
more_personalized_recommendations, event_suggestions,
|
219 |
-
ai_improvements], outputs=
|
220 |
|
221 |
reset_btn.click(reset_chat, outputs=[chatbox, "title"])
|
222 |
user_input.submit(chat, inputs=[user_input, chatbox, name, age, location, gender, ethnicity, height, weight], outputs=[chatbox, user_input])
|
|
|
196 |
ai_improvements = gr.Radio(label="How can AI improve?", choices=["More Options", "Better Quality", "Faster Suggestions"])
|
197 |
|
198 |
# Chat functionality
|
199 |
+
chatbox = gr.Chatbot()
|
200 |
user_input = gr.Textbox(label="Your Message", placeholder="Type your message here...")
|
201 |
|
202 |
# Connect the buttons to their respective functions
|
203 |
+
output_message = gr.Textbox(label="Output Message") # Define an output component
|
204 |
submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
|
205 |
style_preference, color_palette, everyday_style,
|
206 |
preferred_prints, season_preference, outfit_priority,
|
|
|
217 |
ai_usage_frequency, ai_match_preferences,
|
218 |
ai_recommendation, ai_understanding_style,
|
219 |
more_personalized_recommendations, event_suggestions,
|
220 |
+
ai_improvements], outputs=output_message)
|
221 |
|
222 |
reset_btn.click(reset_chat, outputs=[chatbox, "title"])
|
223 |
user_input.submit(chat, inputs=[user_input, chatbox, name, age, location, gender, ethnicity, height, weight], outputs=[chatbox, user_input])
|