Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,6 +96,7 @@ async def run_samba_api_inference(query, system_prompt = None, ignore_context=Fa
|
|
96 |
except requests.exceptions.HTTPError as e:
|
97 |
if post_response.status_code in {401, 503, 504, 429}:
|
98 |
print(f"Attempt failed due to rate limit or gate timeout. Status code: {post_response.status_code}. Trying again in {num_seconds_to_sleep} seconds...")
|
|
|
99 |
await asyncio.sleep(num_seconds_to_sleep)
|
100 |
return await run_samba_api_inference(query) # Retry the request
|
101 |
else:
|
|
|
96 |
except requests.exceptions.HTTPError as e:
|
97 |
if post_response.status_code in {401, 503, 504, 429}:
|
98 |
print(f"Attempt failed due to rate limit or gate timeout. Status code: {post_response.status_code}. Trying again in {num_seconds_to_sleep} seconds...")
|
99 |
+
st.info("Rate limit hit because of all the pipelined queries, wait one second...")
|
100 |
await asyncio.sleep(num_seconds_to_sleep)
|
101 |
return await run_samba_api_inference(query) # Retry the request
|
102 |
else:
|