Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -52,24 +52,30 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 52 |
gr.Markdown("## V_TRY DEMO")
|
| 53 |
with gr.Row():
|
| 54 |
with gr.Column():
|
|
|
|
| 55 |
src = gr.Image(sources="upload", type="filepath", label="Person Image")
|
|
|
|
|
|
|
| 56 |
ref = gr.Image(sources="upload", type="filepath", label="Garment Image")
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
with gr.Column():
|
| 65 |
-
|
| 66 |
-
)
|
| 67 |
-
|
| 68 |
-
|
|
|
|
|
|
|
| 69 |
|
| 70 |
demo.launch(
|
| 71 |
share=True,
|
| 72 |
show_error=True,
|
| 73 |
pwa=True,
|
|
|
|
| 74 |
)
|
| 75 |
|
|
|
|
| 52 |
gr.Markdown("## V_TRY DEMO")
|
| 53 |
with gr.Row():
|
| 54 |
with gr.Column():
|
| 55 |
+
gr.Markdown("####UPLOAD PERSON IMAGE")
|
| 56 |
src = gr.Image(sources="upload", type="filepath", label="Person Image")
|
| 57 |
+
with gr.Column():
|
| 58 |
+
gr,Markdown("####UPLOAD GARMENT IMAGE")
|
| 59 |
ref = gr.Image(sources="upload", type="filepath", label="Garment Image")
|
| 60 |
+
with gr.Column():
|
| 61 |
+
gr.Markdown("####Select the Garment type")
|
| 62 |
+
garment_type = gr.Radio(
|
| 63 |
+
choices=[("Upper", "upper_body"), ("Lower", "lower_body"),("Dress", "dresses")],
|
| 64 |
+
value="upper_body",
|
| 65 |
+
label="Garment Type",
|
| 66 |
+
)
|
| 67 |
with gr.Column():
|
| 68 |
+
gr.Markdown("####Output Image")
|
| 69 |
+
out = gr.Image(type="filepath",label="Result",)
|
| 70 |
+
with gr.Row():
|
| 71 |
+
btn = gr.Button("Generate")
|
| 72 |
+
|
| 73 |
+
btn.click(virtual_tryon, [src, ref, garment_type], out)
|
| 74 |
|
| 75 |
demo.launch(
|
| 76 |
share=True,
|
| 77 |
show_error=True,
|
| 78 |
pwa=True,
|
| 79 |
+
view_api=False
|
| 80 |
)
|
| 81 |
|