Spaces:
Running
Running
Update generate.py
Browse files- generate.py +2 -2
generate.py
CHANGED
@@ -282,11 +282,11 @@ def check_rate_limit(body):
|
|
282 |
|
283 |
# Check limits based on quality
|
284 |
if quality == 'premium':
|
285 |
-
if len(rate_data['premium']) >=
|
286 |
raise ImageError("<div style='text-align: center;'>Premium rate limit exceeded. Check back later or use the <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a>.</div>")
|
287 |
rate_data['premium'].append(current_time)
|
288 |
else: # standard
|
289 |
-
if len(rate_data['standard']) >=
|
290 |
raise ImageError("<div style='text-align: center;'>Standard rate limit exceeded. Check back later or use the <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a>.</div>")
|
291 |
rate_data['standard'].append(current_time)
|
292 |
|
|
|
282 |
|
283 |
# Check limits based on quality
|
284 |
if quality == 'premium':
|
285 |
+
if len(rate_data['premium']) >= 4:
|
286 |
raise ImageError("<div style='text-align: center;'>Premium rate limit exceeded. Check back later or use the <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a>.</div>")
|
287 |
rate_data['premium'].append(current_time)
|
288 |
else: # standard
|
289 |
+
if len(rate_data['standard']) >= 8:
|
290 |
raise ImageError("<div style='text-align: center;'>Standard rate limit exceeded. Check back later or use the <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a>.</div>")
|
291 |
rate_data['standard'].append(current_time)
|
292 |
|