Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
import os
|
4 |
-
import sys
|
5 |
-
import time
|
6 |
-
from threading import Thread
|
7 |
-
|
8 |
-
def restart_script_periodically():
|
9 |
-
while True:
|
10 |
-
time.sleep(600) # 10 minutes
|
11 |
-
try:
|
12 |
-
os.execl( sys.executable, sys.executable, *sys.argv )
|
13 |
-
except:
|
14 |
-
pass
|
15 |
-
Thread( target=restart_script_periodically, daemon=True ).start()
|
16 |
-
|
17 |
imagine = gr.Interface.load( "models/dreamlike-art/dreamlike-photoreal-2.0" )
|
18 |
|
19 |
with gr.Blocks( analytics_enabled=False ) as app:
|
|
|
1 |
import gradio as gr
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
imagine = gr.Interface.load( "models/dreamlike-art/dreamlike-photoreal-2.0" )
|
4 |
|
5 |
with gr.Blocks( analytics_enabled=False ) as app:
|