File size: 585 Bytes
89467ee
5244a75
 
 
 
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
28
29
import gradio as gr
import os
os.system("pip install rembg")
os.system("pip install opencv-python")
import rembg
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()