Clothing-Crop / app.py
Nymbo's picture
Update app.py
19895e1 verified
raw
history blame
1.1 kB
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', label='Image'),
gr.Dropdown(choices=["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"],
value=["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"],
multiselect=True,
label='Clothing')],
outputs=gr.Image(label='Clothing Crop'),
title='Clothing Crop',
description="""
Upload an image to segment out clothing.
""",
examples=[['./1.jpg', ["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"]]],
theme = "Nymbo/Alyx_Theme"
)
iface.launch()