Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from rembg import remove | |
| from PIL import Image | |
| def remove_background(image): | |
| output = remove(image) | |
| return output | |
| iface = gr.Interface( | |
| fn=remove_background, | |
| inputs=gr.Image(type="pil"), | |
| outputs=gr.Image(type="pil"), | |
| title="AI Background Remover", | |
| description="Upload an image to instantly remove its background." | |
| ) | |
| iface.launch() |