Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
with gr.Blocks() as app:
|
| 4 |
+
with gr.Row():
|
| 5 |
+
gr.Markdown(" Clothes Virtual Try ON ")
|
| 6 |
+
with gr.Row():
|
| 7 |
+
with gr.Column():
|
| 8 |
+
cloth_input = gr.Image(sources=['upload'], type="pil", label="Upload the Cloth Image")
|
| 9 |
+
with gr.Column():
|
| 10 |
+
model_input = gr.Image(sources=['upload'], type="pil", label="Upload the Human Image")
|
| 11 |
+
with gr.Row():
|
| 12 |
+
final_output = gr.Image(sources=['upload'], type="pil", label="Final Prediction")
|
| 13 |
+
with gr.Row():
|
| 14 |
+
submit_button = gr.Button("Submit")
|
| 15 |
+
|
| 16 |
+
submit_button.click(fn=run, inputs=[cloth_input, model_input],
|
| 17 |
+
outputs=[final_output])
|
| 18 |
+
app.launch(debug=True, share=True)
|