phenomenon1981 commited on
Commit
0400493
1 Parent(s): 4b86536

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -15,12 +15,8 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
15
 
16
  def restart_script_periodically():
17
  while True:
18
- time.sleep(60) # 10 minutes
19
- devnull = open(os.devnull, 'w')
20
- sys.stdout = devnull
21
- sys.stderr = devnull
22
  os.execl(sys.executable, sys.executable, *sys.argv)
23
- devnull.close()
24
 
25
  restart_thread = Thread(target=restart_script_periodically, daemon=True)
26
  restart_thread.start()
 
15
 
16
  def restart_script_periodically():
17
  while True:
18
+ time.sleep(1020) # 10 minutes
 
 
 
19
  os.execl(sys.executable, sys.executable, *sys.argv)
 
20
 
21
  restart_thread = Thread(target=restart_script_periodically, daemon=True)
22
  restart_thread.start()