Spaces:
Runtime error
Runtime error
| # -*- coding: utf-8 -*- | |
| """Olá, este é o Colaboratory | |
| Automatically generated by Colab. | |
| Original file is located at | |
| https://colab.research.google.com/github/renato186a1/Renato186/blob/main/remove_backgroung_image.ipynb | |
| """ | |
| # prompt: create interface for remove background images + gradio | |
| !pip install -q gradio rembg | |
| import gradio as gr | |
| from rembg import remove | |
| 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="Remove Background from Image", | |
| description="Upload an image and this tool will remove its background.", | |
| ) | |
| iface.launch() |