Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
·
297e42e
1
Parent(s):
081c595
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,10 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-photoreal-2.0")
|
|
17 |
def restart_script_periodically():
|
18 |
while True:
|
19 |
time.sleep(600) # 10 minutes
|
20 |
-
|
|
|
|
|
|
|
21 |
|
22 |
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
23 |
restart_thread.start()
|
|
|
17 |
def restart_script_periodically():
|
18 |
while True:
|
19 |
time.sleep(600) # 10 minutes
|
20 |
+
try:
|
21 |
+
os.execl(sys.executable, sys.executable, *sys.argv)
|
22 |
+
except:
|
23 |
+
pass
|
24 |
|
25 |
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
26 |
restart_thread.start()
|