BraUndress commited on
Commit
51b2b94
1 Parent(s): 2520a50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -2,16 +2,19 @@ import gradio as gr
2
  import imageio
3
 
4
  def dummy(img):
5
- imageio.imwrite("output_image.png", img["mask"])
6
- return img["image"], img["mask"]
7
 
8
  with gr.Blocks() as demo:
9
- with gr.Row():
10
- img = gr.Image(tool="sketch", label="base image", show_label=True)
11
- with gr.Row():
12
- img1 = gr.Image()
13
- img2 = gr.Image(label="mask image", show_label=True)
14
- btn = gr.Button()
15
- btn.click(dummy, img, [img1, img2])
 
 
 
16
 
17
- demo.launch(debug=True)
 
2
  import imageio
3
 
4
  def dummy(img):
5
+ imageio.imwrite("output_image.png", img["mask"])
6
+ return img["image"], img["mask"]
7
 
8
  with gr.Blocks() as demo:
9
+ with gr.Row():
10
+ img = gr.Image(
11
+ tool="sketch", label="base image", show_label=True,
12
+ style={"height": "500px", "max-width": "100%", "@media (max-width: 768px)": {"height": "300px"}}
13
+ )
14
+ with gr.Row():
15
+ img1 = gr.Image()
16
+ img2 = gr.Image(label="mask image", show_label=True)
17
+ btn = gr.Button()
18
+ btn.click(dummy, img, [img1, img2])
19
 
20
+ demo.launch(debug=True)