File size: 415 Bytes
294d977
 
84936f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

gr.Interface.load("models/stabilityai/stable-diffusion-2").launch(share=False)

import asyncio

async def reboot_task():
    while True:
        # Run your code here
        os.system("sudo reboot")
        # Wait for 6 hours
        await asyncio.sleep(6*60*60)

async def main():
    task = asyncio.create_task(reboot_task())
    await task

if __name__ == "__main__":
    asyncio.run(main())