Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
•
3ed7e8e
1
Parent(s):
b2790aa
Update app.py
Browse files
app.py
CHANGED
@@ -158,15 +158,16 @@ with gr.Blocks() as myface:
|
|
158 |
run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
|
159 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt])
|
160 |
|
161 |
-
|
162 |
|
163 |
def queue_monitor():
|
164 |
while True:
|
165 |
if queue.qsize() >= 15:
|
166 |
queue.queue.clear()
|
167 |
-
time.sleep(
|
168 |
-
|
169 |
monitor_thread = Thread(target=queue_monitor)
|
170 |
monitor_thread.start()
|
171 |
|
172 |
myface.launch(enable_queue=True, inline=True)
|
|
|
|
158 |
run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
|
159 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt])
|
160 |
|
161 |
+
myface.queue(concurrency_count=15)
|
162 |
|
163 |
def queue_monitor():
|
164 |
while True:
|
165 |
if queue.qsize() >= 15:
|
166 |
queue.queue.clear()
|
167 |
+
time.sleep(120)
|
168 |
+
|
169 |
monitor_thread = Thread(target=queue_monitor)
|
170 |
monitor_thread.start()
|
171 |
|
172 |
myface.launch(enable_queue=True, inline=True)
|
173 |
+
|