Rembg / app.py
Doubleupai's picture
Create app.py
5545043 verified
Raw
History Blame Contribute Delete
393 Bytes
import gradio as gr
from rembg import remove
def remove_background(image):
# Удаляем фон
output = remove(image)
return output
# Создаем интерфейс приложения
iface = gr.Interface(
fn=remove_background,
inputs=[gr.inputs.Image(type="pil")],
outputs=[gr.outputs.Image(type="pil")]
)
if __name__ == "__main__":
iface.launch()