phenomenon1981 commited on
Commit
6723073
1 Parent(s): 77d02a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -4,6 +4,7 @@ import sys
4
  from pathlib import Path
5
  import random
6
  import string
 
7
 
8
  text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
9
 
@@ -19,41 +20,49 @@ def add_random_noise(prompt, noise_level=0.1):
19
  def send_it1(inputs, noise_level, proc1=proc1):
20
  prompt_with_noise = add_random_noise(inputs, noise_level)
21
  output1=proc1(prompt_with_noise)
 
22
  return output1
23
 
24
  def send_it2(inputs, noise_level, proc1=proc1):
25
  prompt_with_noise = add_random_noise(inputs, noise_level)
26
  output2=proc1(prompt_with_noise)
 
27
  return output2
28
 
29
  def send_it3(inputs, noise_level, proc1=proc1):
30
  prompt_with_noise = add_random_noise(inputs, noise_level)
31
  output3=proc1(prompt_with_noise)
 
32
  return output3
33
 
34
  def send_it4(inputs, noise_level, proc1=proc1):
35
  prompt_with_noise = add_random_noise(inputs, noise_level)
36
  output4=proc1(prompt_with_noise)
 
37
  return output4
38
 
39
  def send_it5(inputs, noise_level, proc5=proc5):
40
  prompt_with_noise = add_random_noise(inputs, noise_level)
41
  output5=proc5(prompt_with_noise)
 
42
  return output5
43
 
44
  def send_it6(inputs, noise_level, proc5=proc5):
45
  prompt_with_noise = add_random_noise(inputs, noise_level)
46
  output6=proc5(prompt_with_noise)
 
47
  return output6
48
 
49
  def send_it7(inputs, noise_level, proc5=proc5):
50
  prompt_with_noise = add_random_noise(inputs, noise_level)
51
  output7=proc5(prompt_with_noise)
 
52
  return output7
53
 
54
  def send_it8(inputs, noise_level, proc5=proc5):
55
  prompt_with_noise = add_random_noise(inputs, noise_level)
56
  output8=proc5(prompt_with_noise)
 
57
  return output8
58
 
59
  def get_prompts(prompt_text):
 
4
  from pathlib import Path
5
  import random
6
  import string
7
+ import time
8
 
9
  text_gen=gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion")
10
 
 
20
  def send_it1(inputs, noise_level, proc1=proc1):
21
  prompt_with_noise = add_random_noise(inputs, noise_level)
22
  output1=proc1(prompt_with_noise)
23
+ time.sleep(1)
24
  return output1
25
 
26
  def send_it2(inputs, noise_level, proc1=proc1):
27
  prompt_with_noise = add_random_noise(inputs, noise_level)
28
  output2=proc1(prompt_with_noise)
29
+ time.sleep(1)
30
  return output2
31
 
32
  def send_it3(inputs, noise_level, proc1=proc1):
33
  prompt_with_noise = add_random_noise(inputs, noise_level)
34
  output3=proc1(prompt_with_noise)
35
+ time.sleep(1)
36
  return output3
37
 
38
  def send_it4(inputs, noise_level, proc1=proc1):
39
  prompt_with_noise = add_random_noise(inputs, noise_level)
40
  output4=proc1(prompt_with_noise)
41
+ time.sleep(1)
42
  return output4
43
 
44
  def send_it5(inputs, noise_level, proc5=proc5):
45
  prompt_with_noise = add_random_noise(inputs, noise_level)
46
  output5=proc5(prompt_with_noise)
47
+ time.sleep(1)
48
  return output5
49
 
50
  def send_it6(inputs, noise_level, proc5=proc5):
51
  prompt_with_noise = add_random_noise(inputs, noise_level)
52
  output6=proc5(prompt_with_noise)
53
+ time.sleep(1)
54
  return output6
55
 
56
  def send_it7(inputs, noise_level, proc5=proc5):
57
  prompt_with_noise = add_random_noise(inputs, noise_level)
58
  output7=proc5(prompt_with_noise)
59
+ time.sleep(1)
60
  return output7
61
 
62
  def send_it8(inputs, noise_level, proc5=proc5):
63
  prompt_with_noise = add_random_noise(inputs, noise_level)
64
  output8=proc5(prompt_with_noise)
65
+ time.sleep(1)
66
  return output8
67
 
68
  def get_prompts(prompt_text):