Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -10,13 +10,13 @@ CATEGORY_ITEMS = {
|
|
10 |
"Skin": ["Left-arm", "Right-arm", "Left-leg", "Right-leg"]
|
11 |
}
|
12 |
|
13 |
-
def segment(
|
14 |
# Get the items based on the selected categories
|
15 |
selected_items = []
|
16 |
-
for category in
|
17 |
selected_items.extend(CATEGORY_ITEMS.get(category, []))
|
18 |
|
19 |
-
return segment_clothing(
|
20 |
|
21 |
iface = gr.Interface(
|
22 |
fn=segment,
|
|
|
10 |
"Skin": ["Left-arm", "Right-arm", "Left-leg", "Right-leg"]
|
11 |
}
|
12 |
|
13 |
+
def segment(image, categories_to_hide):
|
14 |
# Get the items based on the selected categories
|
15 |
selected_items = []
|
16 |
+
for category in categories_to_hide:
|
17 |
selected_items.extend(CATEGORY_ITEMS.get(category, []))
|
18 |
|
19 |
+
return segment_clothing(image, selected_items)
|
20 |
|
21 |
iface = gr.Interface(
|
22 |
fn=segment,
|