removebg / app.py
bluspater's picture
Upload 3 files
db1e9a5 verified
raw
history blame contribute delete
389 Bytes
import gradio as gr
from PIL import Image
from u2net_utils import remove_background
def process(image):
result = remove_background(image)
return result
demo = gr.Interface(
fn=process,
inputs=gr.Image(type="pil"),
outputs=gr.Image(type="pil"),
title="Remove Background",
description="Upload an image and remove the background using U²-Net."
)
demo.launch()