set asyncio sleep to 2
Browse files
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(
|
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!"
|