SergeyO7 commited on
Commit
b35e99b
·
verified ·
1 Parent(s): fa8cc27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,11 +15,11 @@ import time
15
  # --- Constants ---
16
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
17
 
 
18
  # Rate limiting configuration
19
  MAX_MODEL_CALLS_PER_MINUTE = 14 # Conservative buffer below 15 RPM
20
- RATE_LIMIT = MAX_MODEL_CALLS_PER_MINUTE
21
- TOKEN_BUCKET_CAPACITY = RATE_LIMIT
22
- TOKEN_BUCKET_REFILL_RATE = RATE_LIMIT / 60.0 # Tokens per second
23
 
24
  # Initialize global token bucket with MemoryStorage
25
  storage = MemoryStorage()
 
15
  # --- Constants ---
16
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
17
 
18
+
19
  # Rate limiting configuration
20
  MAX_MODEL_CALLS_PER_MINUTE = 14 # Conservative buffer below 15 RPM
21
+ TOKEN_BUCKET_CAPACITY = MAX_MODEL_CALLS_PER_MINUTE
22
+ TOKEN_BUCKET_REFILL_RATE = MAX_MODEL_CALLS_PER_MINUTE / 60.0 # Tokens per second
 
23
 
24
  # Initialize global token bucket with MemoryStorage
25
  storage = MemoryStorage()