fffiloni commited on
Commit
a56420e
·
verified ·
1 Parent(s): 5813089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -167,22 +167,23 @@ def infer(audio_in, oauth_token: gr.OAuthToken):
167
 
168
  gr.Info("Calling SALMONN to understand audio...")
169
  salmonn_res = get_salmonn(audio_in, salmonn_prompt, gradio_auth_token)
170
- yield None, salmonn_res, None, None
171
 
172
  gr.Info("Creating an outfit suggestion based on audio understanding...")
173
  outfit_sentence = get_outfit_prompt(salmonn_res)
174
- yield outfit_sentence, salmonn_res, None, None
175
 
176
  gr.Info("Generate an image with SDXL Lightning...")
177
  outfit_image = sdxl_image(outfit_sentence, gradio_auth_token)
178
 
 
179
  gr.Info("Get outfit parts...")
180
  item_prompts = get_parsed_outfit_items(outfit_sentence)
181
 
182
  gr.Info("Generate shopping gallery...")
183
  images_with_labels = generate_sdxl_images_list_dynamic(item_prompts, gradio_auth_token)
184
-
185
- yield outfit_sentence, salmonn_res, outfit_image, images_with_labels
186
 
187
  demo_title = "Music to Outfit"
188
  description = "Get an outfit idea from audio/music input"
@@ -239,7 +240,7 @@ with gr.Blocks(css=css) as demo:
239
  label = "Outfit propal"
240
  )
241
 
242
- clothes_gallery = gr.Gallery()
243
 
244
  submit_btn.click(
245
  fn = infer,
@@ -250,7 +251,7 @@ with gr.Blocks(css=css) as demo:
250
  caption,
251
  salmonn_desc,
252
  result,
253
- clothes_gallery
254
  ]
255
  )
256
 
 
167
 
168
  gr.Info("Calling SALMONN to understand audio...")
169
  salmonn_res = get_salmonn(audio_in, salmonn_prompt, gradio_auth_token)
170
+ yield None, salmonn_res, None
171
 
172
  gr.Info("Creating an outfit suggestion based on audio understanding...")
173
  outfit_sentence = get_outfit_prompt(salmonn_res)
174
+ yield outfit_sentence, salmonn_res, None
175
 
176
  gr.Info("Generate an image with SDXL Lightning...")
177
  outfit_image = sdxl_image(outfit_sentence, gradio_auth_token)
178
 
179
+ """
180
  gr.Info("Get outfit parts...")
181
  item_prompts = get_parsed_outfit_items(outfit_sentence)
182
 
183
  gr.Info("Generate shopping gallery...")
184
  images_with_labels = generate_sdxl_images_list_dynamic(item_prompts, gradio_auth_token)
185
+ """
186
+ yield outfit_sentence, salmonn_res, outfit_image
187
 
188
  demo_title = "Music to Outfit"
189
  description = "Get an outfit idea from audio/music input"
 
240
  label = "Outfit propal"
241
  )
242
 
243
+ #clothes_gallery = gr.Gallery()
244
 
245
  submit_btn.click(
246
  fn = infer,
 
251
  caption,
252
  salmonn_desc,
253
  result,
254
+ #clothes_gallery
255
  ]
256
  )
257