Spaces:
Runtime error
Runtime error
phenomenon1981
commited on
Commit
•
dc0f820
1
Parent(s):
0391e9b
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def add_random_noise(prompt, noise_level=0.07):
|
|
50 |
def send_it1(inputs, noise_level, proc1=proc1):
|
51 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
52 |
while queue.qsize() >= queue_threshold:
|
53 |
-
time.sleep(
|
54 |
queue.put(prompt_with_noise)
|
55 |
output1 = proc1(queue.get())
|
56 |
return output1
|
@@ -58,7 +58,7 @@ def send_it1(inputs, noise_level, proc1=proc1):
|
|
58 |
def send_it2(inputs, noise_level, proc1=proc1):
|
59 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
60 |
while queue.qsize() >= queue_threshold:
|
61 |
-
time.sleep(
|
62 |
queue.put(prompt_with_noise)
|
63 |
output2 = proc1(queue.get())
|
64 |
return output2
|
@@ -66,7 +66,7 @@ def send_it2(inputs, noise_level, proc1=proc1):
|
|
66 |
def send_it3(inputs, noise_level, proc1=proc1):
|
67 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
68 |
while queue.qsize() >= queue_threshold:
|
69 |
-
time.sleep(
|
70 |
queue.put(prompt_with_noise)
|
71 |
output3 = proc1(queue.get())
|
72 |
return output3
|
@@ -74,7 +74,7 @@ def send_it3(inputs, noise_level, proc1=proc1):
|
|
74 |
def send_it4(inputs, noise_level, proc1=proc1):
|
75 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
76 |
while queue.qsize() >= queue_threshold:
|
77 |
-
time.sleep(
|
78 |
queue.put(prompt_with_noise)
|
79 |
output4 = proc1(queue.get())
|
80 |
return output4
|
@@ -82,7 +82,7 @@ def send_it4(inputs, noise_level, proc1=proc1):
|
|
82 |
def send_it5(inputs, noise_level, proc1=proc1):
|
83 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
84 |
while queue.qsize() >= queue_threshold:
|
85 |
-
time.sleep(
|
86 |
queue.put(prompt_with_noise)
|
87 |
output5 = proc1(queue.get())
|
88 |
return output5
|
@@ -90,7 +90,7 @@ def send_it5(inputs, noise_level, proc1=proc1):
|
|
90 |
def send_it6(inputs, noise_level, proc1=proc1):
|
91 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
92 |
while queue.qsize() >= queue_threshold:
|
93 |
-
time.sleep(
|
94 |
queue.put(prompt_with_noise)
|
95 |
output6 = proc1(queue.get())
|
96 |
return output6
|
@@ -98,7 +98,7 @@ def send_it6(inputs, noise_level, proc1=proc1):
|
|
98 |
def send_it7(inputs, noise_level, proc1=proc1):
|
99 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
100 |
while queue.qsize() >= queue_threshold:
|
101 |
-
time.sleep(
|
102 |
queue.put(prompt_with_noise)
|
103 |
output7 = proc1(queue.get())
|
104 |
return output7
|
@@ -106,7 +106,7 @@ def send_it7(inputs, noise_level, proc1=proc1):
|
|
106 |
def send_it8(inputs, noise_level, proc1=proc1):
|
107 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
108 |
while queue.qsize() >= queue_threshold:
|
109 |
-
time.sleep(
|
110 |
queue.put(prompt_with_noise)
|
111 |
output8 = proc1(queue.get())
|
112 |
return output8
|
@@ -114,7 +114,7 @@ def send_it8(inputs, noise_level, proc1=proc1):
|
|
114 |
|
115 |
def get_prompts(prompt_text):
|
116 |
while queue.qsize() >= queue_threshold:
|
117 |
-
time.sleep(
|
118 |
queue.put(prompt_text)
|
119 |
output = text_gen(queue.get())
|
120 |
return output
|
|
|
50 |
def send_it1(inputs, noise_level, proc1=proc1):
|
51 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
52 |
while queue.qsize() >= queue_threshold:
|
53 |
+
time.sleep(2)
|
54 |
queue.put(prompt_with_noise)
|
55 |
output1 = proc1(queue.get())
|
56 |
return output1
|
|
|
58 |
def send_it2(inputs, noise_level, proc1=proc1):
|
59 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
60 |
while queue.qsize() >= queue_threshold:
|
61 |
+
time.sleep(2)
|
62 |
queue.put(prompt_with_noise)
|
63 |
output2 = proc1(queue.get())
|
64 |
return output2
|
|
|
66 |
def send_it3(inputs, noise_level, proc1=proc1):
|
67 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
68 |
while queue.qsize() >= queue_threshold:
|
69 |
+
time.sleep(2)
|
70 |
queue.put(prompt_with_noise)
|
71 |
output3 = proc1(queue.get())
|
72 |
return output3
|
|
|
74 |
def send_it4(inputs, noise_level, proc1=proc1):
|
75 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
76 |
while queue.qsize() >= queue_threshold:
|
77 |
+
time.sleep(2)
|
78 |
queue.put(prompt_with_noise)
|
79 |
output4 = proc1(queue.get())
|
80 |
return output4
|
|
|
82 |
def send_it5(inputs, noise_level, proc1=proc1):
|
83 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
84 |
while queue.qsize() >= queue_threshold:
|
85 |
+
time.sleep(2)
|
86 |
queue.put(prompt_with_noise)
|
87 |
output5 = proc1(queue.get())
|
88 |
return output5
|
|
|
90 |
def send_it6(inputs, noise_level, proc1=proc1):
|
91 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
92 |
while queue.qsize() >= queue_threshold:
|
93 |
+
time.sleep(2)
|
94 |
queue.put(prompt_with_noise)
|
95 |
output6 = proc1(queue.get())
|
96 |
return output6
|
|
|
98 |
def send_it7(inputs, noise_level, proc1=proc1):
|
99 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
100 |
while queue.qsize() >= queue_threshold:
|
101 |
+
time.sleep(2)
|
102 |
queue.put(prompt_with_noise)
|
103 |
output7 = proc1(queue.get())
|
104 |
return output7
|
|
|
106 |
def send_it8(inputs, noise_level, proc1=proc1):
|
107 |
prompt_with_noise = add_random_noise(inputs, noise_level)
|
108 |
while queue.qsize() >= queue_threshold:
|
109 |
+
time.sleep(2)
|
110 |
queue.put(prompt_with_noise)
|
111 |
output8 = proc1(queue.get())
|
112 |
return output8
|
|
|
114 |
|
115 |
def get_prompts(prompt_text):
|
116 |
while queue.qsize() >= queue_threshold:
|
117 |
+
time.sleep(2)
|
118 |
queue.put(prompt_text)
|
119 |
output = text_gen(queue.get())
|
120 |
return output
|