Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -323,7 +323,7 @@ def app_gradio():
|
|
323 |
# define root_path
|
324 |
root_path = "resource/demo/example"
|
325 |
|
326 |
-
# First column
|
327 |
with gr.Column(scale=1, min_width=350):
|
328 |
# Person image
|
329 |
image_path = gr.Image(
|
@@ -334,17 +334,18 @@ def app_gradio():
|
|
334 |
person_image = gr.ImageEditor(
|
335 |
interactive=True, label="Person Image", type="filepath"
|
336 |
)
|
337 |
-
|
338 |
# Mask instruction
|
339 |
-
gr.
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
|
|
|
|
348 |
# Model column examples
|
349 |
# Men examples
|
350 |
men_exm = gr.Examples(
|
@@ -385,18 +386,14 @@ def app_gradio():
|
|
385 |
# '<span style="color: #808080; font-size: small;">*Condition examples come from the Internet. </span>'
|
386 |
# )
|
387 |
|
388 |
-
# Second column
|
389 |
with gr.Column(scale=1, min_width=350):
|
390 |
# Clothes image
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
)
|
396 |
-
|
397 |
-
with gr.Row():
|
398 |
# Clothes column examples
|
399 |
-
with gr.Column(scale = 1, min_width=230):
|
400 |
# Upper clothes examples
|
401 |
condition_upper_exm = gr.Examples(
|
402 |
examples=[
|
@@ -420,7 +417,7 @@ def app_gradio():
|
|
420 |
|
421 |
|
422 |
|
423 |
-
|
424 |
with gr.Row():
|
425 |
with gr.Column():
|
426 |
# Result pennal
|
|
|
323 |
# define root_path
|
324 |
root_path = "resource/demo/example"
|
325 |
|
326 |
+
# First column ==============================
|
327 |
with gr.Column(scale=1, min_width=350):
|
328 |
# Person image
|
329 |
image_path = gr.Image(
|
|
|
334 |
person_image = gr.ImageEditor(
|
335 |
interactive=True, label="Person Image", type="filepath"
|
336 |
)
|
|
|
337 |
# Mask instruction
|
338 |
+
gr.Row():
|
339 |
+
gr.Column(scale = 1):
|
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 |
+
gr.Column(scale = 1):
|
344 |
+
cloth_type = gr.Radio(
|
345 |
+
label="Try-On Cloth Type",
|
346 |
+
choices=["upper", "lower", "overall"],
|
347 |
+
value="upper",
|
348 |
+
)
|
349 |
# Model column examples
|
350 |
# Men examples
|
351 |
men_exm = gr.Examples(
|
|
|
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):
|
391 |
# Clothes image
|
392 |
+
cloth_image = gr.Image(
|
393 |
+
interactive=True, label="Clothes Image", type="filepath"
|
394 |
+
)
|
395 |
+
|
|
|
|
|
|
|
396 |
# Clothes column examples
|
|
|
397 |
# Upper clothes examples
|
398 |
condition_upper_exm = gr.Examples(
|
399 |
examples=[
|
|
|
417 |
|
418 |
|
419 |
|
420 |
+
# Below ===============================================================
|
421 |
with gr.Row():
|
422 |
with gr.Column():
|
423 |
# Result pennal
|