phenomenon1981 commited on
Commit
57c0c2c
1 Parent(s): 9cb1e92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -8,13 +8,9 @@ import time
8
  from queue import Queue
9
  from threading import Thread
10
 
11
- text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
12
  proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0", live=True)
13
 
14
- def get_prompts(prompt_text):
15
- output = text_gen(prompt_text)
16
- return output
17
-
18
  def restart_script_periodically():
19
  while True:
20
  time.sleep(600) # 10 minutes
@@ -26,7 +22,9 @@ restart_thread.start()
26
  queue = Queue()
27
  queue_threshold = 50
28
 
29
- queue_length_counter = 0
 
 
30
 
31
  def add_random_noise(prompt, noise_level=0.07):
32
  # Get the percentage of characters to add as noise
 
8
  from queue import Queue
9
  from threading import Thread
10
 
11
+ text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion", live=True)
12
  proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0", live=True)
13
 
 
 
 
 
14
  def restart_script_periodically():
15
  while True:
16
  time.sleep(600) # 10 minutes
 
22
  queue = Queue()
23
  queue_threshold = 50
24
 
25
+ def get_prompts(prompt_text):
26
+ output = text_gen(prompt_text)
27
+ return output
28
 
29
  def add_random_noise(prompt, noise_level=0.07):
30
  # Get the percentage of characters to add as noise