Spaces:
Runtime error
Runtime error
File size: 699 Bytes
761c5c5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# -*- 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() |