Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
•
e7d25bd
1
Parent(s):
7e43f5e
Update app.py
Browse files
app.py
CHANGED
@@ -11,16 +11,19 @@ from threading import Thread
|
|
11 |
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
12 |
def get_prompts(prompt_text):
|
13 |
return text_gen(prompt_text)
|
14 |
-
proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
|
15 |
|
16 |
def restart_script_periodically():
|
17 |
while True:
|
18 |
time.sleep(600) # 10 minutes
|
19 |
-
|
|
|
|
|
|
|
20 |
|
21 |
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
22 |
restart_thread.start()
|
23 |
|
|
|
24 |
queue = Queue()
|
25 |
queue_threshold = 100
|
26 |
|
|
|
11 |
text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
|
12 |
def get_prompts(prompt_text):
|
13 |
return text_gen(prompt_text)
|
|
|
14 |
|
15 |
def restart_script_periodically():
|
16 |
while True:
|
17 |
time.sleep(600) # 10 minutes
|
18 |
+
try:
|
19 |
+
os.execl(sys.executable, sys.executable, *sys.argv)
|
20 |
+
except:
|
21 |
+
pass
|
22 |
|
23 |
restart_thread = Thread(target=restart_script_periodically, daemon=True)
|
24 |
restart_thread.start()
|
25 |
|
26 |
+
|
27 |
queue = Queue()
|
28 |
queue_threshold = 100
|
29 |
|