phenomenon1981 commited on
Commit
edf9f05
1 Parent(s): 1450cbb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -16,9 +16,11 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
16
 
17
  def restart_script_periodically():
18
  while True:
19
- time.sleep(600) # 10 minutes
 
20
  os.execl(sys.executable, sys.executable, *sys.argv)
21
 
 
22
  restart_thread = Thread(target=restart_script_periodically, daemon=True)
23
  restart_thread.start()
24
 
 
16
 
17
  def restart_script_periodically():
18
  while True:
19
+ random_time = random.randint(420, 600)
20
+ time.sleep(random_time)
21
  os.execl(sys.executable, sys.executable, *sys.argv)
22
 
23
+
24
  restart_thread = Thread(target=restart_script_periodically, daemon=True)
25
  restart_thread.start()
26