Spaces:
Sleeping
Sleeping
lixiang46
commited on
Commit
•
2231fef
1
Parent(s):
8d83455
update
Browse files
app.py
CHANGED
@@ -68,6 +68,7 @@ def tryon(person_img, garment_img, seed, randomize_seed):
|
|
68 |
break
|
69 |
elif status == "error":
|
70 |
err_log = f"Status is Error"
|
|
|
71 |
else:
|
72 |
# print(response.text)
|
73 |
err_log = "URL error, pleace contact the admin"
|
@@ -81,7 +82,7 @@ def tryon(person_img, garment_img, seed, randomize_seed):
|
|
81 |
get_end_time = time.time()
|
82 |
print(f"get time used: {get_end_time-get_start_time}")
|
83 |
print(f"all time used: {get_end_time-get_start_time+post_end_time-post_start_time}")
|
84 |
-
if
|
85 |
err_log = f"No image after {Max_Retry} retries"
|
86 |
info = "Too many users, please try again later"
|
87 |
if info != "Success":
|
|
|
68 |
break
|
69 |
elif status == "error":
|
70 |
err_log = f"Status is Error"
|
71 |
+
info = "Error"
|
72 |
else:
|
73 |
# print(response.text)
|
74 |
err_log = "URL error, pleace contact the admin"
|
|
|
82 |
get_end_time = time.time()
|
83 |
print(f"get time used: {get_end_time-get_start_time}")
|
84 |
print(f"all time used: {get_end_time-get_start_time+post_end_time-post_start_time}")
|
85 |
+
if result_img == None:
|
86 |
err_log = f"No image after {Max_Retry} retries"
|
87 |
info = "Too many users, please try again later"
|
88 |
if info != "Success":
|