phenomenon1981 commited on
Commit
1ddf9fa
1 Parent(s): b68e8fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -36
app.py CHANGED
@@ -42,74 +42,47 @@ def add_random_noise(prompt, noise_level=0.07):
42
 
43
  def send_it1(inputs, noise_level, proc1=proc1):
44
  prompt_with_noise = add_random_noise(inputs, noise_level)
45
- while queue.qsize() >= queue_threshold:
46
- time.sleep()
47
- queue.put(prompt_with_noise)
48
- output1 = proc1(queue.get())
49
  return output1
50
 
51
  def send_it2(inputs, noise_level, proc1=proc1):
52
  prompt_with_noise = add_random_noise(inputs, noise_level)
53
- while queue.qsize() >= queue_threshold:
54
- time.sleep()
55
- queue.put(prompt_with_noise)
56
- output2 = proc1(queue.get())
57
  return output2
58
 
59
  def send_it3(inputs, noise_level, proc1=proc1):
60
  prompt_with_noise = add_random_noise(inputs, noise_level)
61
- while queue.qsize() >= queue_threshold:
62
- time.sleep()
63
- queue.put(prompt_with_noise)
64
- output3 = proc1(queue.get())
65
  return output3
66
 
67
  def send_it4(inputs, noise_level, proc1=proc1):
68
  prompt_with_noise = add_random_noise(inputs, noise_level)
69
- while queue.qsize() >= queue_threshold:
70
- time.sleep()
71
- queue.put(prompt_with_noise)
72
- output4 = proc1(queue.get())
73
  return output4
74
 
75
  def send_it5(inputs, noise_level, proc1=proc1):
76
  prompt_with_noise = add_random_noise(inputs, noise_level)
77
- while queue.qsize() >= queue_threshold:
78
- time.sleep()
79
- queue.put(prompt_with_noise)
80
- output5 = proc1(queue.get())
81
  return output5
82
 
83
  def send_it6(inputs, noise_level, proc1=proc1):
84
  prompt_with_noise = add_random_noise(inputs, noise_level)
85
- while queue.qsize() >= queue_threshold:
86
- time.sleep()
87
- queue.put(prompt_with_noise)
88
- output6 = proc1(queue.get())
89
  return output6
90
 
91
  def send_it7(inputs, noise_level, proc1=proc1):
92
  prompt_with_noise = add_random_noise(inputs, noise_level)
93
- while queue.qsize() >= queue_threshold:
94
- time.sleep()
95
- queue.put(prompt_with_noise)
96
- output7 = proc1(queue.get())
97
  return output7
98
 
99
  def send_it8(inputs, noise_level, proc1=proc1):
100
  prompt_with_noise = add_random_noise(inputs, noise_level)
101
- while queue.qsize() >= queue_threshold:
102
- time.sleep()
103
- queue.put(prompt_with_noise)
104
- output8 = proc1(queue.get())
105
  return output8
106
 
107
 
108
  def get_prompts(prompt_text):
109
- while queue.qsize() >= queue_threshold:
110
- time.sleep()
111
- queue.put(prompt_text)
112
- output = text_gen(queue.get())
113
  return output
114
 
115
 
 
42
 
43
  def send_it1(inputs, noise_level, proc1=proc1):
44
  prompt_with_noise = add_random_noise(inputs, noise_level)
45
+ output1 = proc1(prompt_with_noise)
 
 
 
46
  return output1
47
 
48
  def send_it2(inputs, noise_level, proc1=proc1):
49
  prompt_with_noise = add_random_noise(inputs, noise_level)
50
+ output2 = proc1(prompt_with_noise)
 
 
 
51
  return output2
52
 
53
  def send_it3(inputs, noise_level, proc1=proc1):
54
  prompt_with_noise = add_random_noise(inputs, noise_level)
55
+ output3 = proc1(prompt_with_noise)
 
 
 
56
  return output3
57
 
58
  def send_it4(inputs, noise_level, proc1=proc1):
59
  prompt_with_noise = add_random_noise(inputs, noise_level)
60
+ output4 = proc1(prompt_with_noise)
 
 
 
61
  return output4
62
 
63
  def send_it5(inputs, noise_level, proc1=proc1):
64
  prompt_with_noise = add_random_noise(inputs, noise_level)
65
+ output5 = proc1(prompt_with_noise)
 
 
 
66
  return output5
67
 
68
  def send_it6(inputs, noise_level, proc1=proc1):
69
  prompt_with_noise = add_random_noise(inputs, noise_level)
70
+ output6 = proc1(prompt_with_noise)
 
 
 
71
  return output6
72
 
73
  def send_it7(inputs, noise_level, proc1=proc1):
74
  prompt_with_noise = add_random_noise(inputs, noise_level)
75
+ output7 = proc1(prompt_with_noise)
 
 
 
76
  return output7
77
 
78
  def send_it8(inputs, noise_level, proc1=proc1):
79
  prompt_with_noise = add_random_noise(inputs, noise_level)
80
+ output8 = proc1(prompt_with_noise)
 
 
 
81
  return output8
82
 
83
 
84
  def get_prompts(prompt_text):
85
+ output = text_gen(prompt_text)
 
 
 
86
  return output
87
 
88