Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
·
394ac91
1
Parent(s):
1abcbac
Update app.py
Browse files
app.py
CHANGED
@@ -160,13 +160,6 @@ with gr.Blocks() as myface:
|
|
160 |
run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
|
161 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt])
|
162 |
|
|
|
163 |
myface.launch(enable_queue=True, inline=True)
|
164 |
-
block.queue(concurrency_count=15, max_size=30).launch(max_threads=20)
|
165 |
-
def restart_script_periodically():
|
166 |
-
while True:
|
167 |
-
time.sleep(120) # 5 minutes
|
168 |
-
os.execl(sys.executable, sys.executable, *sys.argv)
|
169 |
-
|
170 |
-
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
171 |
-
restart_thread.start()
|
172 |
reset_queue_thread.join()
|
|
|
160 |
run.click(send_it8, inputs=[prompt, noise_level], outputs=[output8])
|
161 |
see_prompts.click(get_prompts, inputs=[input_text], outputs=[prompt])
|
162 |
|
163 |
+
myface.queue(concurrency_count=8)
|
164 |
myface.launch(enable_queue=True, inline=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
reset_queue_thread.join()
|