phenomenon1981 commited on
Commit
8394fe0
1 Parent(s): 7030fb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -19,7 +19,7 @@ proc1=gr.Interface.load("models/dreamlike-art/dreamlike-diffusion-1.0")
19
 
20
  def restart_script_periodically():
21
  while True:
22
- random_time = random.randint(480, 600)
23
  time.sleep(random_time)
24
  os.execl(sys.executable, sys.executable, *sys.argv)
25
 
@@ -31,9 +31,9 @@ restart_thread.start()
31
  queue = Queue()
32
  queue_threshold = 100
33
 
34
- def add_random_noise(prompt, noise_level=0.07):
35
  if noise_level == 0:
36
- noise_level = 0.07
37
  percentage_noise = noise_level * 5
38
  num_noise_chars = int(len(prompt) * (percentage_noise/100))
39
  noise_indices = random.sample(range(len(prompt)), num_noise_chars)
 
19
 
20
  def restart_script_periodically():
21
  while True:
22
+ random_time = random.randint(540, 600)
23
  time.sleep(random_time)
24
  os.execl(sys.executable, sys.executable, *sys.argv)
25
 
 
31
  queue = Queue()
32
  queue_threshold = 100
33
 
34
+ def add_random_noise(prompt, noise_level=0.00):
35
  if noise_level == 0:
36
+ noise_level = 0.00
37
  percentage_noise = noise_level * 5
38
  num_noise_chars = int(len(prompt) * (percentage_noise/100))
39
  noise_indices = random.sample(range(len(prompt)), num_noise_chars)