Spaces:
Runtime error
Runtime error
Change Layout
Browse files
app.py
CHANGED
@@ -35,18 +35,20 @@ def generate_with_mask_(image_path: str, cloth_path: str = None, prompt: str = N
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
44 |
cloth_url = gr.inputs.Textbox(label = "Cloth Image URL")
|
45 |
-
|
46 |
-
prompt = gr.inputs.Textbox(lines=5, label="Editing Prompt")
|
47 |
-
with gr.Column():
|
48 |
output = gr.outputs.Image(type = "pil", label="Generated Image")
|
49 |
run = gr.Button(label="Generate Preview")
|
50 |
-
run.click(generate_with_mask_, inputs=[
|
|
|
|
|
51 |
|
52 |
demo.launch()
|
|
|
35 |
|
36 |
|
37 |
with gr.Blocks() as demo:
|
38 |
+
gr.Markdown('# Try On Clothes Online!')
|
39 |
+
gr.Markdown('## Add Your Image via an Image URL or By Simply Uploading it')
|
40 |
+
gr.Markdown('## Paste in a link of a Product from Flipkart, Amazon or Myntra and See the Preview! You can also paste in any Image link!')
|
41 |
+
|
42 |
+
with gr.Row():
|
43 |
+
with gr.Column():
|
44 |
+
image = gr.inputs.Image(type = "pil", label = "Input Image")
|
45 |
+
# image_url = gr.inputs.Textbox(label = "Input Image URL")
|
46 |
cloth_url = gr.inputs.Textbox(label = "Cloth Image URL")
|
47 |
+
prompt = gr.inputs.Textbox(label="Editing Prompt")
|
|
|
|
|
48 |
output = gr.outputs.Image(type = "pil", label="Generated Image")
|
49 |
run = gr.Button(label="Generate Preview")
|
50 |
+
run.click(generate_with_mask_, inputs=[image, cloth_url, prompt], outputs=output)
|
51 |
+
|
52 |
+
demo.launch()
|
53 |
|
54 |
demo.launch()
|