Update app.py
Browse files
app.py
CHANGED
|
@@ -252,6 +252,23 @@ def start_tryon(dict, garm_img, garment_des, is_checked, is_checked_crop, denois
|
|
| 252 |
else:
|
| 253 |
return images[0], mask_gray, status_message
|
| 254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 255 |
image_blocks = gr.Blocks(theme="Nymbo/Nymbo_Theme").queue(max_size=12)
|
| 256 |
with image_blocks as demo:
|
| 257 |
with gr.Column():
|
|
|
|
| 252 |
else:
|
| 253 |
return images[0], mask_gray, status_message
|
| 254 |
|
| 255 |
+
|
| 256 |
+
garm_list = os.listdir(os.path.join(example_path,"cloth"))
|
| 257 |
+
garm_list_path = [os.path.join(example_path,"cloth",garm) for garm in garm_list]
|
| 258 |
+
|
| 259 |
+
human_list = os.listdir(os.path.join(example_path,"human"))
|
| 260 |
+
human_list_path = [os.path.join(example_path,"human",human) for human in human_list]
|
| 261 |
+
|
| 262 |
+
human_ex_list = []
|
| 263 |
+
for ex_human in human_list_path:
|
| 264 |
+
ex_dict= {}
|
| 265 |
+
ex_dict['background'] = ex_human
|
| 266 |
+
ex_dict['layers'] = None
|
| 267 |
+
ex_dict['composite'] = None
|
| 268 |
+
human_ex_list.append(ex_dict)
|
| 269 |
+
|
| 270 |
+
##default human
|
| 271 |
+
|
| 272 |
image_blocks = gr.Blocks(theme="Nymbo/Nymbo_Theme").queue(max_size=12)
|
| 273 |
with image_blocks as demo:
|
| 274 |
with gr.Column():
|