Spaces:
Running
Running
Update translate.py
Browse files- translate.py +1 -1
translate.py
CHANGED
@@ -75,7 +75,7 @@ def enhance_text(api_key, text):
|
|
75 |
else:
|
76 |
print(f"Error: {response.status_code}, {response.text}, retrying in 30 seconds...")
|
77 |
attempts += 1
|
78 |
-
time.sleep(
|
79 |
print("Error Max attempts reached. Could not retrieve a successful response.")
|
80 |
te = translate_text(api_key, text)
|
81 |
return te
|
|
|
75 |
else:
|
76 |
print(f"Error: {response.status_code}, {response.text}, retrying in 30 seconds...")
|
77 |
attempts += 1
|
78 |
+
time.sleep(10)
|
79 |
print("Error Max attempts reached. Could not retrieve a successful response.")
|
80 |
te = translate_text(api_key, text)
|
81 |
return te
|