schroneko's picture
Add application file
2c9a089
raw
history blame
No virus
445 Bytes
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()