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