bluspater/remove-bg-modnet
0
1import gradio as gr2import shutil3from PIL import Image4from modnet_utils import remove_background5 6shutil.rmtree('__pycache__', ignore_errors=True)7 8def process(image: Image.Image) -> Image.Image:9 return remove_background_modnet(image)10 11demo = gr.Interface(fn=process, inputs=gr.Image(type="pil"), outputs="image")12demo.launch()13 