phenomenon1981 commited on
Commit
72b485b
1 Parent(s): 770cb17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -8,22 +8,22 @@ import time
8
  from queue import Queue
9
  from threading import Thread
10
 
11
- queue = Queue()
12
- queue_threshold = 30
13
-
14
- text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
15
- proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0", live=True)
16
-
17
-
18
  def stop_proc1_periodically():
19
  while True:
20
  time.sleep(60) # 5 minutes
21
  queue.queue.clear()
22
- proc1.stop(timeout=30)
23
 
24
  stop_proc1_thread = Thread(target=stop_proc1_periodically, daemon=True)
25
  stop_proc1_thread.start()
26
 
 
 
 
 
 
 
 
27
 
28
  queue_length_counter = 0
29
 
 
8
  from queue import Queue
9
  from threading import Thread
10
 
 
 
 
 
 
 
 
11
  def stop_proc1_periodically():
12
  while True:
13
  time.sleep(60) # 5 minutes
14
  queue.queue.clear()
15
+ proc1.kill()
16
 
17
  stop_proc1_thread = Thread(target=stop_proc1_periodically, daemon=True)
18
  stop_proc1_thread.start()
19
 
20
+ queue = Queue()
21
+ queue_threshold = 30
22
+
23
+ text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
24
+ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0", live=True)
25
+
26
+
27
 
28
  queue_length_counter = 0
29