nvn04 commited on
Commit
59fa012
·
verified ·
1 Parent(s): 7c73bd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -18
app.py CHANGED
@@ -336,11 +336,11 @@ def app_gradio():
336
  )
337
  # Mask instruction
338
  with gr.Row():
339
- with gr.Column(scale = 1, min_width=230):
340
  gr.Markdown(
341
  '<span style="color: #808080; font-size: small;">Two ways to provide Mask:<br>1. Upload the person image and use the `🖌️` above to draw the Mask (higher priority)<br>2. Select the `Try-On Cloth Type` to generate automatically </span>'
342
  )
343
- with gr.Column(scale = 1, min_width=230):
344
  cloth_type = gr.Radio(
345
  label="Try-On Cloth Type",
346
  choices=["upper", "lower", "overall"],
@@ -371,20 +371,7 @@ def app_gradio():
371
  gr.Markdown(
372
  '<span style="color: #808080; font-size: small;">*Person examples come from the demos of <a href="https://huggingface.co/spaces/levihsu/OOTDiffusion">OOTDiffusion</a> and <a href="https://www.outfitanyone.org">OutfitAnyone</a>. </span>'
373
  )
374
- # # Person pose example
375
- # condition_person_exm = gr.Examples(
376
- # examples=[
377
- # os.path.join(root_path, "condition", "person", _)
378
- # for _ in os.listdir(os.path.join(root_path, "condition", "person"))
379
- # ],
380
- # examples_per_page=4,
381
- # inputs=cloth_image,
382
- # label="Condition Reference Person Examples",
383
- # )
384
- # # Display text
385
- # gr.Markdown(
386
- # '<span style="color: #808080; font-size: small;">*Condition examples come from the Internet. </span>'
387
- # )
388
 
389
  # Second column ==========================================
390
  with gr.Column(scale=1, min_width=350):
@@ -402,7 +389,17 @@ def app_gradio():
402
  ],
403
  examples_per_page=4,
404
  inputs=cloth_image,
405
- label="Condition Upper Examples",
 
 
 
 
 
 
 
 
 
 
406
  )
407
  # Full-body clothes examples
408
  condition_overall_exm = gr.Examples(
@@ -412,7 +409,7 @@ def app_gradio():
412
  ],
413
  examples_per_page=4,
414
  inputs=cloth_image,
415
- label="Condition Overall Examples",
416
  )
417
 
418
 
 
336
  )
337
  # Mask instruction
338
  with gr.Row():
339
+ with gr.Column(scale = 1, min_width=80):
340
  gr.Markdown(
341
  '<span style="color: #808080; font-size: small;">Two ways to provide Mask:<br>1. Upload the person image and use the `🖌️` above to draw the Mask (higher priority)<br>2. Select the `Try-On Cloth Type` to generate automatically </span>'
342
  )
343
+ with gr.Column(scale = 1, min_width=80):
344
  cloth_type = gr.Radio(
345
  label="Try-On Cloth Type",
346
  choices=["upper", "lower", "overall"],
 
371
  gr.Markdown(
372
  '<span style="color: #808080; font-size: small;">*Person examples come from the demos of <a href="https://huggingface.co/spaces/levihsu/OOTDiffusion">OOTDiffusion</a> and <a href="https://www.outfitanyone.org">OutfitAnyone</a>. </span>'
373
  )
374
+
 
 
 
 
 
 
 
 
 
 
 
 
 
375
 
376
  # Second column ==========================================
377
  with gr.Column(scale=1, min_width=350):
 
389
  ],
390
  examples_per_page=4,
391
  inputs=cloth_image,
392
+ label="Upper clothes",
393
+ )
394
+ # Lower clothes examples
395
+ condition_upper_exm = gr.Examples(
396
+ examples=[
397
+ os.path.join(root_path, "condition", "lower", _)
398
+ for _ in os.listdir(os.path.join(root_path, "condition", "upper"))
399
+ ],
400
+ examples_per_page=4,
401
+ inputs=cloth_image,
402
+ label="Lower clothes",
403
  )
404
  # Full-body clothes examples
405
  condition_overall_exm = gr.Examples(
 
409
  ],
410
  examples_per_page=4,
411
  inputs=cloth_image,
412
+ label="Full-body clothes",
413
  )
414
 
415