Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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.
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
with gr.
|
251 |
-
|
252 |
-
|
253 |
-
with gr.Row():
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
with gr.Row():
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
with gr.Row():
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
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):
|