Spaces:
Sleeping
Sleeping
lixiang46
commited on
Commit
•
f24d75a
1
Parent(s):
a079d6c
change concurrency_limit
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def tryon(person_img, garment_img, seed, randomize_seed):
|
|
53 |
for i in range(Max_Retry):
|
54 |
try:
|
55 |
url = "http://" + os.environ['tryon_url'] + "Query?taskId=" + uuid
|
56 |
-
response = requests.get(url, headers=headers, timeout=
|
57 |
# print("get response code", response.status_code)
|
58 |
if response.status_code == 200:
|
59 |
result = response.json()['result']
|
@@ -242,7 +242,7 @@ with gr.Blocks(css=css) as Tryon:
|
|
242 |
|
243 |
|
244 |
# try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon',concurrency_limit=10)
|
245 |
-
test_button.click(fn=tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon', concurrency_limit=
|
246 |
|
247 |
with gr.Column(elem_id = "col-showcase"):
|
248 |
gr.HTML("""
|
|
|
53 |
for i in range(Max_Retry):
|
54 |
try:
|
55 |
url = "http://" + os.environ['tryon_url'] + "Query?taskId=" + uuid
|
56 |
+
response = requests.get(url, headers=headers, timeout=20)
|
57 |
# print("get response code", response.status_code)
|
58 |
if response.status_code == 200:
|
59 |
result = response.json()['result']
|
|
|
242 |
|
243 |
|
244 |
# try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon',concurrency_limit=10)
|
245 |
+
test_button.click(fn=tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon', concurrency_limit=60)
|
246 |
|
247 |
with gr.Column(elem_id = "col-showcase"):
|
248 |
gr.HTML("""
|