SergeyO7 commited on
Commit
f542976
·
verified ·
1 Parent(s): 33cffad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -23,8 +23,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
23
 
24
  # Rate limiting configuration
25
  RATE_LIMIT = 15 # Requests per minute
26
- TOKEN_BUCKET_CAPACITY
27
- = RATE_LIMIT
28
  TOKEN_BUCKET_REFILL_RATE = RATE_LIMIT / 60.0 # Tokens per second
29
 
30
  # Initialize global token bucket with MemoryStorage
@@ -66,7 +65,8 @@ async def submit_answers(session: aiohttp.ClientSession, submit_url: str,
66
  print(f"An unexpected error occurred during submission: {e}")
67
  return None
68
 
69
- async def process_question(agent, question_text: str, task_id: str, results_log: list):
 
70
  """Process a single question with global rate limiting."""
71
  submitted_answer = None
72
  try:
 
23
 
24
  # Rate limiting configuration
25
  RATE_LIMIT = 15 # Requests per minute
26
+ TOKEN_BUCKET_CAPACITY = RATE_LIMIT
 
27
  TOKEN_BUCKET_REFILL_RATE = RATE_LIMIT / 60.0 # Tokens per second
28
 
29
  # Initialize global token bucket with MemoryStorage
 
65
  print(f"An unexpected error occurred during submission: {e}")
66
  return None
67
 
68
+ async def process_question(agent, question_text: str, task_id: str,
69
+ results_log: list):
70
  """Process a single question with global rate limiting."""
71
  submitted_answer = None
72
  try: