SPACERUNNER99 commited on
Commit
b1b46fc
·
verified ·
1 Parent(s): d3dc0d5

Update translate.py

Browse files
Files changed (1) hide show
  1. 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(30)
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