alex-i07 commited on
Commit
b997411
·
1 Parent(s): 797ba01

sleep in order not to hit claude token limit

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  import inspect
3
  import urllib3
4
  import tempfile
@@ -114,6 +115,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
114
  submitted_answer = agent(question_text, question_filepath)
115
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
116
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
 
117
 
118
  except Exception as e:
119
  print(f"Error running agent on task {task_id}: {e}")
 
1
  import os
2
+ import time
3
  import inspect
4
  import urllib3
5
  import tempfile
 
115
  submitted_answer = agent(question_text, question_filepath)
116
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
117
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
118
+ time.sleep(2) #sleep in order not to hit claude token limit
119
 
120
  except Exception as e:
121
  print(f"Error running agent on task {task_id}: {e}")