Spaces:
Running
on
Zero
Running
on
Zero
File size: 445 Bytes
2c9a089 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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()
|