phenomenon1981
commited on
Commit
•
bb1cefd
1
Parent(s):
fb55a53
Update app.py
Browse files
app.py
CHANGED
@@ -152,4 +152,13 @@ with gr.Blocks() as myface:
|
|
152 |
|
153 |
myface.launch(enable_queue=True, inline=True)
|
154 |
block.queue(concurrency_count=80, max_size=100).launch(max_threads=150)
|
155 |
-
reset_queue_thread.join()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
myface.launch(enable_queue=True, inline=True)
|
154 |
block.queue(concurrency_count=80, max_size=100).launch(max_threads=150)
|
155 |
+
reset_queue_thread.join()
|
156 |
+
|
157 |
+
|
158 |
+
def restart_script_periodically():
|
159 |
+
while True:
|
160 |
+
time.sleep(300) # 5 minutes
|
161 |
+
os.execl(sys.executable, sys.executable, *sys.argv)
|
162 |
+
|
163 |
+
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
164 |
+
restart_thread.start()
|