Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from SegCloth import segment_clothing
|
3 |
|
4 |
-
# Define items for each category
|
5 |
CATEGORY_ITEMS = {
|
|
|
6 |
"Clothes": ["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"],
|
7 |
"Face": ["Face", "Sunglasses"],
|
8 |
"Hair": ["Hair"],
|
@@ -22,13 +23,13 @@ iface = gr.Interface(
|
|
22 |
inputs=[
|
23 |
gr.Image(type='pil', label='Image'),
|
24 |
|
25 |
-
# Category Selection CheckboxGroup
|
26 |
-
gr.CheckboxGroup(choices=["Clothes", "Face", "Hair", "Skin"],
|
27 |
label='Select Categories',
|
28 |
-
value=["Clothes", "Face", "Hair", "Skin"]) # Default selection
|
29 |
],
|
30 |
outputs=gr.Image(label='Clothing Crop'),
|
31 |
-
examples=[['./1.jpg', ["Clothes", "Face"]]],
|
32 |
theme="Nymbo/Alyx_Theme"
|
33 |
)
|
34 |
|
|
|
1 |
import gradio as gr
|
2 |
from SegCloth import segment_clothing
|
3 |
|
4 |
+
# Define items for each category, including Background
|
5 |
CATEGORY_ITEMS = {
|
6 |
+
"Background": ["Background"],
|
7 |
"Clothes": ["Hat", "Upper-clothes", "Skirt", "Pants", "Dress", "Belt", "Left-shoe", "Right-shoe", "Scarf"],
|
8 |
"Face": ["Face", "Sunglasses"],
|
9 |
"Hair": ["Hair"],
|
|
|
23 |
inputs=[
|
24 |
gr.Image(type='pil', label='Image'),
|
25 |
|
26 |
+
# Category Selection CheckboxGroup including Background
|
27 |
+
gr.CheckboxGroup(choices=["Background", "Clothes", "Face", "Hair", "Skin"],
|
28 |
label='Select Categories',
|
29 |
+
value=["Background", "Clothes", "Face", "Hair", "Skin"]) # Default selection
|
30 |
],
|
31 |
outputs=gr.Image(label='Clothing Crop'),
|
32 |
+
examples=[['./1.jpg', ["Background", "Clothes", "Face"]]],
|
33 |
theme="Nymbo/Alyx_Theme"
|
34 |
)
|
35 |
|