Rahmat82 commited on
Commit
e2cd936
·
verified ·
1 Parent(s): c55edb0

set asyncio sleep to 2

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ async def summarize(text, retries=3):
36
  if e.status == 503 and attempt < retries - 1:
37
  print(f"Retry attempt {attempt+1} for 503 error.")
38
  # add a short delay before retrying
39
- await asyncio.sleep(1)
40
  continue
41
  else:
42
  return "Oops! 🙈 It looks like those mischievous monkeys🐒 might be swinging around the server, causing a bit of chaos with the cables. Please try it again!"
 
36
  if e.status == 503 and attempt < retries - 1:
37
  print(f"Retry attempt {attempt+1} for 503 error.")
38
  # add a short delay before retrying
39
+ await asyncio.sleep(2)
40
  continue
41
  else:
42
  return "Oops! 🙈 It looks like those mischievous monkeys🐒 might be swinging around the server, causing a bit of chaos with the cables. Please try it again!"