Warlord-K commited on
Commit
0a781f5
·
1 Parent(s): 6bcd741

Change Layout

Browse files
Files changed (1) hide show
  1. app.py +12 -10
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
- with gr.Column():
39
- with gr.Row():
40
- # image = gr.inputs.Image(type = "pil", label = "Input Image")
41
- image_url = gr.inputs.Textbox(label = "Input Image URL")
42
- with gr.Row():
43
- # cloth = gr.inputs.Image(type = "pil", label = "Cloth Image")
 
 
44
  cloth_url = gr.inputs.Textbox(label = "Cloth Image URL")
45
- with gr.Row():
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=[image_url, cloth_url, prompt], outputs=output)
 
 
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()