Spaces:
Running
Running
File size: 414 Bytes
c10f4a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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", 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) |