Update app.py
Browse files
app.py
CHANGED
@@ -163,22 +163,62 @@ with gr.Blocks() as demo:
|
|
163 |
fit_preference = gr.Radio(label="What fit do you prefer in clothes?", choices=["Loose", "Tailored", "Fitted", "Oversized"])
|
164 |
material_preference = gr.Radio(label="Which material do you prefer?", choices=["Cotton", "Linen", "Silk", "Denim", "Wool"])
|
165 |
|
166 |
-
# More preferences
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
# Reset chat functionality
|
172 |
-
reset_btn.click(reset_chat, outputs=[chatbox, chatbox])
|
173 |
|
174 |
-
#
|
175 |
submit_btn.click(submit_questionnaire, inputs=[name, age, location, gender, ethnicity, height, weight,
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
163 |
fit_preference = gr.Radio(label="What fit do you prefer in clothes?", choices=["Loose", "Tailored", "Fitted", "Oversized"])
|
164 |
material_preference = gr.Radio(label="Which material do you prefer?", choices=["Cotton", "Linen", "Silk", "Denim", "Wool"])
|
165 |
|
166 |
+
# More preferences
|
167 |
+
top_preference = gr.Radio(label="Preferred Top Styles", choices=["T-shirts", "Shirts", "Sweaters", "Blouses"])
|
168 |
+
bottom_preference = gr.Radio(label="Preferred Bottom Styles", choices=["Jeans", "Shorts", "Skirts", "Trousers"])
|
169 |
+
outerwear_preference = gr.Radio(label="Preferred Outerwear", choices=["Jackets", "Coats", "Hoodies"])
|
170 |
+
footwear_preference = gr.Radio(label="Preferred Footwear", choices=["Sneakers", "Boots", "Sandals"])
|
171 |
+
dress_frequency = gr.Radio(label="How often do you wear dresses?", choices=["Daily", "Weekly", "Occasionally", "Rarely"])
|
172 |
+
layering_preference = gr.Radio(label="Do you like layering?", choices=["Yes", "No"])
|
173 |
+
jeans_fit = gr.Radio(label="Preferred Jeans Fit", choices=["Skinny", "Straight", "Baggy"])
|
174 |
+
formal_wear_frequency = gr.Radio(label="How often do you wear formal attire?", choices=["Daily", "Weekly", "Occasionally", "Rarely"])
|
175 |
+
sportswear_preference = gr.Radio(label="Preferred Sportswear Style", choices=["Athletic", "Casual", "Fashionable"])
|
176 |
+
party_outfit = gr.Radio(label="Preferred Outfit for Parties", choices=["Dresses", "Suits", "Casual Wear"])
|
177 |
+
confidence_in_style = gr.Radio(label="How confident do you feel in your style?", choices=["Very Confident", "Somewhat Confident", "Not Confident"])
|
178 |
+
follow_fashion_trends = gr.Radio(label="Do you follow fashion trends?", choices=["Always", "Sometimes", "Never"])
|
179 |
+
look_for_inspiration = gr.Radio(label="Where do you look for fashion inspiration?", choices=["Social Media", "Fashion Magazines", "Friends", "Other"])
|
180 |
+
wardrobe_satisfaction = gr.Radio(label="Are you satisfied with your wardrobe?", choices=["Yes", "No"])
|
181 |
+
unique_style = gr.Radio(label="Do you consider your style unique?", choices=["Yes", "No"])
|
182 |
+
outfit_struggle = gr.Radio(label="Do you struggle to put outfits together?", choices=["Yes", "No"])
|
183 |
+
fashion_preference = gr.Radio(label="What is your fashion preference?", choices=["Trendy", "Classic", "Bohemian", "Minimalist"])
|
184 |
+
gender_neutral_clothing = gr.Radio(label="Do you wear gender-neutral clothing?", choices=["Yes", "No"])
|
185 |
+
special_occasion_attire = gr.Radio(label="Do you have specific attire for special occasions?", choices=["Yes", "No"])
|
186 |
+
trendsetter = gr.Radio(label="Do you consider yourself a trendsetter?", choices=["Yes", "No"])
|
187 |
+
ai_usefulness = gr.Radio(label="How useful do you find AI in fashion?", choices=["Very Useful", "Somewhat Useful", "Not Useful"])
|
188 |
+
trust_in_ai = gr.Radio(label="Do you trust AI fashion recommendations?", choices=["Yes", "No"])
|
189 |
+
ai_preference = gr.Radio(label="Do you prefer AI recommendations?", choices=["Yes", "No"])
|
190 |
+
ai_usage_frequency = gr.Radio(label="How often do you use AI for fashion?", choices=["Daily", "Weekly", "Rarely", "Never"])
|
191 |
+
ai_match_preferences = gr.Radio(label="Does AI match your preferences?", choices=["Always", "Sometimes", "Rarely", "Never"])
|
192 |
+
ai_recommendation = gr.Radio(label="How satisfied are you with AI recommendations?", choices=["Very Satisfied", "Satisfied", "Dissatisfied"])
|
193 |
+
ai_understanding_style = gr.Radio(label="Does AI understand your style?", choices=["Very Well", "Somewhat", "Not Well"])
|
194 |
+
more_personalized_recommendations = gr.Radio(label="Do you want more personalized recommendations?", choices=["Yes", "No"])
|
195 |
+
event_suggestions = gr.Radio(label="Would you like event-specific suggestions?", choices=["Yes", "No"])
|
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(type='messages')
|
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,
|
206 |
+
experiment_with_trends, accessories, fit_preference,
|
207 |
+
material_preference, top_preference, bottom_preference,
|
208 |
+
outerwear_preference, footwear_preference, dress_frequency,
|
209 |
+
layering_preference, jeans_fit, formal_wear_frequency,
|
210 |
+
sportswear_preference, party_outfit, confidence_in_style,
|
211 |
+
follow_fashion_trends, look_for_inspiration,
|
212 |
+
wardrobe_satisfaction, unique_style, outfit_struggle,
|
213 |
+
fashion_preference, gender_neutral_clothing,
|
214 |
+
special_occasion_attire, trendsetter,
|
215 |
+
ai_usefulness, trust_in_ai, ai_preference,
|
216 |
+
ai_usage_frequency, ai_match_preferences,
|
217 |
+
ai_recommendation, ai_understanding_style,
|
218 |
+
more_personalized_recommendations, event_suggestions,
|
219 |
+
ai_improvements], outputs="text")
|
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])
|
223 |
|
224 |
# Run the app
|