Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,19 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
gr.Interface.load("models/stabilityai/stable-diffusion-2").launch(share=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
gr.Interface.load("models/stabilityai/stable-diffusion-2").launch(share=False)
|
| 4 |
+
|
| 5 |
+
import asyncio
|
| 6 |
+
|
| 7 |
+
async def reboot_task():
|
| 8 |
+
while True:
|
| 9 |
+
# Run your code here
|
| 10 |
+
os.system("sudo reboot")
|
| 11 |
+
# Wait for 6 hours
|
| 12 |
+
await asyncio.sleep(6*60*60)
|
| 13 |
+
|
| 14 |
+
async def main():
|
| 15 |
+
task = asyncio.create_task(reboot_task())
|
| 16 |
+
await task
|
| 17 |
+
|
| 18 |
+
if __name__ == "__main__":
|
| 19 |
+
asyncio.run(main())
|