mrfakename commited on
Commit
fab6487
1 Parent(s): 6234be3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,16 +13,16 @@ def reboot():
13
  if current_time - last_run >= 300:
14
  api.restart_space('mrfakename/OpenDalleV1.1-GPU-Demo', factory_reboot=True)
15
  last_run = current_time
16
- return "Rebooted"
17
  else:
18
- raise gr.Error("The Space has already been rebooted recently")
19
  def rebootorig():
20
  global olast_run
21
  current_time = time.time()
22
  if current_time - olast_run >= 300:
23
  api.restart_space('mrfakename/OpenDalle-GPU-Demo', factory_reboot=True)
24
  olast_run = current_time
25
- return "Rebooted"
26
  else:
27
  raise gr.Error("The Space has already been rebooted recently")
28
  with gr.Blocks() as demo:
 
13
  if current_time - last_run >= 300:
14
  api.restart_space('mrfakename/OpenDalleV1.1-GPU-Demo', factory_reboot=True)
15
  last_run = current_time
16
+ return "Rebooted. Thank you!"
17
  else:
18
+ raise gr.Error("The Space has already been rebooted recently, please try again in 5 minutes.")
19
  def rebootorig():
20
  global olast_run
21
  current_time = time.time()
22
  if current_time - olast_run >= 300:
23
  api.restart_space('mrfakename/OpenDalle-GPU-Demo', factory_reboot=True)
24
  olast_run = current_time
25
+ return "Rebooted. Thank you!"
26
  else:
27
  raise gr.Error("The Space has already been rebooted recently")
28
  with gr.Blocks() as demo: