schroneko's picture
Update app.py
1567106 verified
raw
history blame
No virus
480 Bytes
import spaces
import gradio as gr
from transparent_background import Remover
@spaces.GPU
def remove_background(image):
remover = Remover()
output = remover.process(image)
return output
iface = gr.Interface(
fn=remove_background,
inputs=gr.Image(label="Upload Image"),
outputs=gr.Image(label="Output Image"),
title="Background Remover",
description="Upload an image and get the background removed."
)
if __name__ == "__main__":
iface.launch()