NikhilJoson commited on
Commit
a7134a1
·
verified ·
1 Parent(s): a734bdc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -37
app.py CHANGED
@@ -238,43 +238,42 @@ with image_blocks as demo:
238
  gr.HTML("<center><h1>Virtual Try-On</h1></center>")
239
  gr.HTML("<center><p>Upload an image of a person and images of the clothes✨</p></center>")
240
 
241
- with gr.Column():
242
- inp_img = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)
243
- with gr.Row():
244
- is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)
245
- with gr.Row():
246
- is_checked_crop = gr.Checkbox(label="Yes", info="Use auto-crop & resizing",value=False)
247
- example = gr.Examples(inputs=inp_img, examples_per_page=10, examples=human_ex_list)
248
-
249
- with gr.Column():
250
- with gr.Row():
251
- topwear_image = gr.Image(label="Topwear", sources='upload', type="pil")
252
- with gr.Row(elem_id="topwear-prompt-container"):
253
- with gr.Row():
254
- topwear_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
255
- example = gr.Examples(inputs=topwear_image, examples_per_page=8,examples=topwear_list_path)
256
- with gr.Row():
257
- bottomwear_image = gr.Image(label="Bottomwear", sources='upload', type="pil")
258
- with gr.Row(elem_id="bottomwear-prompt-container"):
259
- with gr.Row():
260
- bottomwear_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
261
- example = gr.Examples(inputs=bottomwear_image, examples_per_page=8, examples=bottomwear_list_path)
262
- with gr.Row():
263
- dress_image = gr.Image(label="Dress", sources='upload', type="pil")
264
- with gr.Row(elem_id="dress-prompt-container"):
265
- with gr.Row():
266
- dress_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
267
- example = gr.Examples(inputs=dress_image, examples_per_page=8, examples=dress_list_path)
268
-
269
- with gr.Column():
270
- # image_out = gr.Image(label="Output", elem_id="output-img", height=400)
271
- image_out = gr.Image(label="Output", elem_id="output-img",show_share_button=False)
272
- with gr.Accordion("Debug Info", open=False):
273
- image_in = gr.Image(label="Midway Image", elem_id="midway-img",show_share_button=False)
274
- masked_img = gr.Image(label="Masked image output", elem_id="masked-img",show_share_button=False)
275
-
276
-
277
-
278
 
279
  with gr.Column():
280
  with gr.Accordion(label="Advanced Settings", open=False):
 
238
  gr.HTML("<center><h1>Virtual Try-On</h1></center>")
239
  gr.HTML("<center><p>Upload an image of a person and images of the clothes✨</p></center>")
240
 
241
+ with gr.Row():
242
+ with gr.Column():
243
+ inp_img = gr.ImageEditor(sources='upload', type="pil", label='Human. Mask with pen or use auto-masking', interactive=True)
244
+ with gr.Row():
245
+ is_checked = gr.Checkbox(label="Yes", info="Use auto-generated mask (Takes 5 seconds)",value=True)
246
+ with gr.Row():
247
+ is_checked_crop = gr.Checkbox(label="Yes", info="Use auto-crop & resizing",value=False)
248
+ example = gr.Examples(inputs=inp_img, examples_per_page=10, examples=human_ex_list)
249
+
250
+ with gr.Column():
251
+ with gr.Row():
252
+ topwear_image = gr.Image(label="Topwear", sources='upload', type="pil")
253
+ with gr.Row(elem_id="topwear-prompt-container"):
254
+ with gr.Row():
255
+ topwear_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
256
+ example = gr.Examples(inputs=topwear_image, examples_per_page=8,examples=topwear_list_path)
257
+ with gr.Row():
258
+ bottomwear_image = gr.Image(label="Bottomwear", sources='upload', type="pil")
259
+ with gr.Row(elem_id="bottomwear-prompt-container"):
260
+ with gr.Row():
261
+ bottomwear_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
262
+ example = gr.Examples(inputs=bottomwear_image, examples_per_page=8, examples=bottomwear_list_path)
263
+ with gr.Row():
264
+ dress_image = gr.Image(label="Dress", sources='upload', type="pil")
265
+ with gr.Row(elem_id="dress-prompt-container"):
266
+ with gr.Row():
267
+ dress_desc = gr.Textbox(placeholder="Description of garment ex) Short Sleeve Round Neck T-shirts", show_label=False, elem_id="prompt")
268
+ example = gr.Examples(inputs=dress_image, examples_per_page=8, examples=dress_list_path)
269
+
270
+ with gr.Row():
271
+ with gr.Column():
272
+ # image_out = gr.Image(label="Output", elem_id="output-img", height=400)
273
+ image_out = gr.Image(label="Output", elem_id="output-img",show_share_button=False)
274
+ with gr.Accordion("Debug Info", open=False):
275
+ image_in = gr.Image(label="Midway Image", elem_id="midway-img",show_share_button=False)
276
+ masked_img = gr.Image(label="Masked image output", elem_id="masked-img",show_share_button=False)
 
277
 
278
  with gr.Column():
279
  with gr.Accordion(label="Advanced Settings", open=False):