Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,10 @@ import gradio as gr
|
|
| 2 |
from SegCloth import segment_clothing
|
| 3 |
|
| 4 |
def segment(img, clothes, face, hair, skin):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
selected_items = clothes + face + hair + skin # Combine all selections into one list
|
| 6 |
return segment_clothing(img, selected_items)
|
| 7 |
|
|
|
|
| 2 |
from SegCloth import segment_clothing
|
| 3 |
|
| 4 |
def segment(img, clothes, face, hair, skin):
|
| 5 |
+
clothes = clothes if clothes is not None else []
|
| 6 |
+
face = face if face is not None else []
|
| 7 |
+
hair = hair if hair is not None else []
|
| 8 |
+
skin = skin if skin is not None else []
|
| 9 |
selected_items = clothes + face + hair + skin # Combine all selections into one list
|
| 10 |
return segment_clothing(img, selected_items)
|
| 11 |
|