Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
lixiang46
commited on
Commit
•
24f237b
1
Parent(s):
73416e5
update
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def tryon(person_img, garment_img, seed, randomize_seed):
|
|
32 |
"seed": seed
|
33 |
}
|
34 |
try:
|
35 |
-
response = requests.post(url, headers=headers, data=json.dumps(data), timeout=
|
36 |
print("post response code", response.status_code)
|
37 |
if response.status_code == 200:
|
38 |
result = response.json()['result']
|
@@ -46,7 +46,7 @@ def tryon(person_img, garment_img, seed, randomize_seed):
|
|
46 |
print(f"time used: {post_end_time-post_start_time}")
|
47 |
|
48 |
get_start_time =time.time()
|
49 |
-
time.sleep(
|
50 |
Max_Retry = 10
|
51 |
for i in range(Max_Retry):
|
52 |
try:
|
|
|
32 |
"seed": seed
|
33 |
}
|
34 |
try:
|
35 |
+
response = requests.post(url, headers=headers, data=json.dumps(data), timeout=25)
|
36 |
print("post response code", response.status_code)
|
37 |
if response.status_code == 200:
|
38 |
result = response.json()['result']
|
|
|
46 |
print(f"time used: {post_end_time-post_start_time}")
|
47 |
|
48 |
get_start_time =time.time()
|
49 |
+
time.sleep(9)
|
50 |
Max_Retry = 10
|
51 |
for i in range(Max_Retry):
|
52 |
try:
|