phenomenon1981 commited on
Commit
675aa8b
·
1 Parent(s): f621a66

Update app.py

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