Spaces:
Runtime error
Runtime error
lixiang46
commited on
Commit
•
002bcad
1
Parent(s):
c04be13
add threads
Browse files
app.py
CHANGED
@@ -162,7 +162,7 @@ with gr.Blocks(css=css) as Tryon:
|
|
162 |
try_button = gr.Button(value="Run", elem_id="button")
|
163 |
|
164 |
|
165 |
-
try_button.click(fn=start_tryon, inputs=[imgs, garm_img, seed, randomize_seed], outputs=[image_out, seed_used, result_info], api_name='tryon')
|
166 |
|
167 |
with gr.Column(elem_id = "col-showcase"):
|
168 |
gr.HTML("""
|
@@ -184,4 +184,4 @@ with gr.Blocks(css=css) as Tryon:
|
|
184 |
|
185 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|
186 |
print("ip address", ip)
|
187 |
-
Tryon.queue(
|
|
|
162 |
try_button = gr.Button(value="Run", elem_id="button")
|
163 |
|
164 |
|
165 |
+
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)
|
166 |
|
167 |
with gr.Column(elem_id = "col-showcase"):
|
168 |
gr.HTML("""
|
|
|
184 |
|
185 |
ip = requests.get('http://ifconfig.me/ip', timeout=1).text.strip()
|
186 |
print("ip address", ip)
|
187 |
+
Tryon.queue(max_size = 20).launch(max_threads = 5)
|