Hatman commited on
Commit
cb5a183
1 Parent(s): b2da89d

Update generate.py

Browse files

Added Party Rock Link

Files changed (1) hide show
  1. generate.py +6 -2
generate.py CHANGED
@@ -283,11 +283,15 @@ def check_rate_limit(body):
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
 
293
  # Update rate limit file
 
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, use the
287
+ <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a> or
288
+ try it out without an AWS account on <a href='https://partyrock.aws/'>PartyRock</a>.</div>""")
289
  rate_data['premium'].append(current_time)
290
  else: # standard
291
  if len(rate_data['standard']) >= 8:
292
+ raise ImageError("""<div style='text-align: center;'>Standard rate limit exceeded. Check back later, use the
293
+ <a href='https://docs.aws.amazon.com/bedrock/latest/userguide/playgrounds.html'>Bedrock Playground</a> or
294
+ try it out without an AWS account on <a href='https://partyrock.aws/'>PartyRock</a>.</div>""")
295
  rate_data['standard'].append(current_time)
296
 
297
  # Update rate limit file