bgr / app.py
schroneko's picture
Update app.py
c4b3a12 verified
raw
history blame
459 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.inputs.Image(),
outputs=gr.outputs.Image(),
title="Background Remover",
description="Upload an image and get the background removed.",
)
if __name__ == "__main__":
iface.launch()