File size: 566 Bytes
89467ee
a7db0ba
89467ee
 
 
 
 
 
 
 
 
7e83db8
89467ee
6dfff8e
89467ee
f25b978
89467ee
 
 
 
 
 
 
 
91de7f0
 
89467ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
os.system("/usr/local/bin/python -m pip install --upgrade pip")
import gradio as gr
from rembg import remove
import cv2

def inference(img):
    input_img = cv2.imread(img)
    output = remove(input_img[:, :, [2,1,0]])
    return output

title = "Eliminar Background"

description = ""

article = ""


gr.Interface(
    inference, 
    gr.inputs.Image(type="filepath", label="Input"), 
    gr.outputs.Image(type="pil", label="Output"),
    title=title,
    description=description,
    article=article,
    css="Footer {visibility: hidden}"
    ).launch()