import spaces | |
import gradio as gr | |
from transparent_background import Remover | |
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() | |