File size: 478 Bytes
bddf3b8
 
 
88157ff
 
bddf3b8
88157ff
 
 
 
 
bddf3b8
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr
from SegCloth import segment_clothing

def segment(img, clothes):
    return segment_clothing(img, clothes)

iface = gr.Interface(fn=segment, 
                     inputs=[gr.Image(type='pil'), 
                             gr.Dropdown(choices=["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"],
                                         multiselect=True)], 
                     outputs=gr.Image())
iface.launch()