Spaces:
Sleeping
Sleeping
Upload user_dress.py
Browse files- user_dress.py +4 -2
user_dress.py
CHANGED
@@ -16,6 +16,8 @@ def user_dress_cat(user_pic, cloth_gen, index):
|
|
16 |
filename_2 = 'cloth_image.jpg'
|
17 |
file_path_1 = os.path.join(UPLOAD_FOLDER, filename_1)
|
18 |
file_path_2 = os.path.join(UPLOAD_FOLDER, filename_2)
|
|
|
|
|
19 |
Image.fromarray(user_pic).save(file_path_1)
|
20 |
Image.fromarray(cloth_gen).save(file_path_2)
|
21 |
time_2 = time.time()
|
@@ -25,8 +27,8 @@ def user_dress_cat(user_pic, cloth_gen, index):
|
|
25 |
handler = fal_client.submit(
|
26 |
"fal-ai/cat-vton",
|
27 |
arguments={
|
28 |
-
"human_image_url":
|
29 |
-
"garment_image_url":
|
30 |
"cloth_type": "overall"
|
31 |
},
|
32 |
)
|
|
|
16 |
filename_2 = 'cloth_image.jpg'
|
17 |
file_path_1 = os.path.join(UPLOAD_FOLDER, filename_1)
|
18 |
file_path_2 = os.path.join(UPLOAD_FOLDER, filename_2)
|
19 |
+
fal_file_path_1=fal_client.upload_file(file_path_1)
|
20 |
+
fal_file_path_2=fal_client.upload_file(file_path_2)
|
21 |
Image.fromarray(user_pic).save(file_path_1)
|
22 |
Image.fromarray(cloth_gen).save(file_path_2)
|
23 |
time_2 = time.time()
|
|
|
27 |
handler = fal_client.submit(
|
28 |
"fal-ai/cat-vton",
|
29 |
arguments={
|
30 |
+
"human_image_url": fal_file_path_1,
|
31 |
+
"garment_image_url": fal_file_path_2,
|
32 |
"cloth_type": "overall"
|
33 |
},
|
34 |
)
|