File size: 403 Bytes
cd881be 036f159 cd881be |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
from rembg import remove
def remove_background(image):
output_image = remove(image)
return output_image
with gr.Blocks() as demo:
with gr.Row():
image_input = gr.Image(type="pil")
image_output = gr.Image(type="pil")
image_input.change(fn=remove_background, inputs=image_input, outputs=image_output)
if __name__ == "__main__":
demo.launch() |