mhmdrza's picture
Update app.py
84936f2
raw
history blame contribute delete
415 Bytes
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())