tonyassi's picture
Update app.py
2d924e4 verified
raw
history blame
1.27 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'),
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)],
outputs=gr.Image(),
title='Clothing Segmentation',
description="""
by [Tony Assi](https://www.tonyassi.com/)
This space uses the [Clothing Segmentation Github Repo](https://github.com/TonyAssi/Segment-Clothing). Please ❤️ this Space.
I build custom AI apps for companies. <a href="mailto: [email protected]">Email me</a> for business inquiries.
""",
examples=[['./1.jpg']],
theme = gr.themes.Base(primary_hue="teal",secondary_hue="teal",neutral_hue="slate"))
iface.launch()