mrfakename commited on
Commit
5677962
·
verified ·
1 Parent(s): ae10ef2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -25,9 +25,13 @@ def rebootorig():
25
  return "Rebooted. Thank you!"
26
  else:
27
  raise gr.Error("The Space has already been rebooted recently, please try again in 5 minutes.")
 
 
28
  with gr.Blocks() as demo:
29
- gr.Markdown("# Request a Reboot of OpenDalle v1.1 GPU Demo\n\nIs [the demo](https://huggingface.co/spaces/mrfakename/OpenDalleV1.1-GPU-Demo) not working? Request a reboot!\n\nNOTE: Feel free to Duplicate this space and use it for your own projects. It's good to let your users reboot the Space if it goes down (link to it in a pinned Discussion, not your Space itself, since your Space will be inaccessible if it goes down). If you do duplicate, please link back to this original space. Thanks :)")
30
- btn = gr.Button("Reboot V1.1 GPU DEMO")
 
 
31
  btn.click(reboot, outputs=[btn])
32
  #btnorig = gr.Button("Reboot V1 (original) GPU DEMO")
33
  #btnorig.click(rebootorig, outputs=[btnorig])
 
25
  return "Rebooted. Thank you!"
26
  else:
27
  raise gr.Error("The Space has already been rebooted recently, please try again in 5 minutes.")
28
+ def rebootvc():
29
+ api.restart_space('mrfakename/MegaTTS3-Voice-Cloning')
30
  with gr.Blocks() as demo:
31
+ gr.Markdown("# Request a reboot on demo spaces")
32
+ btn = gr.Button("Reboot MegaTTS3 Voice Cloning Demo")
33
+ btn.click(rebootvc, outputs=[btn])
34
+ btn = gr.Button("Reboot OpenDALLE V1.1 GPU DEMO")
35
  btn.click(reboot, outputs=[btn])
36
  #btnorig = gr.Button("Reboot V1 (original) GPU DEMO")
37
  #btnorig.click(rebootorig, outputs=[btnorig])