antoinette-f commited on
Commit
9c10873
·
verified ·
1 Parent(s): 7f8d54c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -132,23 +132,6 @@ def respond(message, chat_history):
132
  # Return the updated chat history and the image paths
133
  return chat_history, image_paths
134
 
135
-
136
- # Gradio UI ---
137
- with gr.Blocks(theme=custom_theme, css=css) as demo:
138
- gr.Markdown("## Fashioneer - your fashion pioneer!")
139
- gr.Markdown("Ask me what to wear and I'll suggest clothing with images from the database.")
140
-
141
- # This is the search bar at the top
142
- user_input = gr.Textbox(label="Type your outfit requirements here", placeholder="e.g., What should I wear on a rainy day?")
143
-
144
- # This row will place the chatbot and gallery side-by-side
145
- with gr.Row():
146
- chatbot = gr.Chatbot(label="Chatbot Conversation")
147
- gallery = gr.Gallery(label="Recommended Clothing", columns=2, height='auto')
148
-
149
- # This is the original line that connects the input and output
150
- user_input.submit(fn=respond, inputs=[user_input, chatbot], outputs=[chatbot, gallery])
151
-
152
  # Define custom colors from your palette
153
  pink_bg = "#EBBAB9"
154
  dark_blue_output = "#407076"
@@ -192,4 +175,21 @@ custom_theme = gr.themes.Soft(
192
  value="#D3AF37"
193
  )
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  demo.launch()
 
132
  # Return the updated chat history and the image paths
133
  return chat_history, image_paths
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  # Define custom colors from your palette
136
  pink_bg = "#EBBAB9"
137
  dark_blue_output = "#407076"
 
175
  value="#D3AF37"
176
  )
177
 
178
+ # Gradio UI ---
179
+ with gr.Blocks(theme=custom_theme, css=css) as demo:
180
+ gr.Markdown("## Fashioneer - your fashion pioneer!")
181
+ gr.Markdown("Ask me what to wear and I'll suggest clothing with images from the database.")
182
+
183
+ # This is the search bar at the top
184
+ user_input = gr.Textbox(label="Type your outfit requirements here", placeholder="e.g., What should I wear on a rainy day?")
185
+
186
+ # This row will place the chatbot and gallery side-by-side
187
+ with gr.Row():
188
+ chatbot = gr.Chatbot(label="Chatbot Conversation")
189
+ gallery = gr.Gallery(label="Recommended Clothing", columns=2, height='auto')
190
+
191
+ # This is the original line that connects the input and output
192
+ user_input.submit(fn=respond, inputs=[user_input, chatbot], outputs=[chatbot, gallery])
193
+
194
+
195
  demo.launch()