mask-maker / app.py
aisuko's picture
Add width and height
698bb5c
raw
history blame
437 Bytes
import gradio as gr
import imageio
def dummy(img):
imageio.imwrite("output_image.png", img["mask"])
return img["image"], img["mask"]
with gr.Blocks() as demo:
with gr.Row():
img = gr.Image(tool="sketch", label="base image", width=512, height=512, show_label=True)
img1 = gr.Image()
img2 = gr.Image(label="mask image", show_label=True)
btn = gr.Button()
btn.click(dummy, img, [img1, img2])
demo.launch(debug=True)