Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
·
1809540
1
Parent(s):
2a81cc9
Update app.py
Browse files
app.py
CHANGED
@@ -160,15 +160,15 @@ with gr.Blocks() as myface:
|
|
160 |
|
161 |
|
162 |
|
163 |
-
|
164 |
|
165 |
def queue_monitor():
|
166 |
while True:
|
167 |
if queue.qsize() >= 15:
|
168 |
queue.queue.clear()
|
169 |
time.sleep(30)
|
|
|
|
|
|
|
170 |
|
171 |
-
|
172 |
-
monitor_thread.start()
|
173 |
-
|
174 |
-
myface.launch(enable_queue=True, inline=True)
|
|
|
160 |
|
161 |
|
162 |
|
163 |
+
|
164 |
|
165 |
def queue_monitor():
|
166 |
while True:
|
167 |
if queue.qsize() >= 15:
|
168 |
queue.queue.clear()
|
169 |
time.sleep(30)
|
170 |
+
myface.queue(concurrency_count=8)
|
171 |
+
monitor_thread = Thread(target=queue_monitor)
|
172 |
+
monitor_thread.start()
|
173 |
|
174 |
+
myface.launch(enable_queue=True, inline=True)
|
|
|
|
|
|