Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,13 @@ def send_it1(inputs, noise_level, proc=proc1):
|
|
| 52 |
prompt_with_noise = add_random_noise(inputs, noise_level) + f" - {timestamp}"
|
| 53 |
while queue.qsize() >= queue_threshold:
|
| 54 |
time.sleep(2)
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
import random
|
| 59 |
|
| 60 |
import random
|
|
|
|
| 52 |
prompt_with_noise = add_random_noise(inputs, noise_level) + f" - {timestamp}"
|
| 53 |
while queue.qsize() >= queue_threshold:
|
| 54 |
time.sleep(2)
|
| 55 |
+
try:
|
| 56 |
+
output = proc(prompt_with_noise)
|
| 57 |
+
return output
|
| 58 |
+
except Exception as e:
|
| 59 |
+
print(f"An error occurred: {e}")
|
| 60 |
+
return "An error occurred. Please try again later."
|
| 61 |
+
|
| 62 |
import random
|
| 63 |
|
| 64 |
import random
|