kit086 commited on
Commit
7d7185d
·
1 Parent(s): 8d65e3b

feat: 每个问题之间添加 60s 延迟

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -5,6 +5,7 @@ import inspect
5
  from dotenv import load_dotenv
6
  from agent import Agent
7
  import pandas as pd
 
8
 
9
  # (Keep Constants as is)
10
  # --- Constants ---
@@ -89,6 +90,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
89
  except Exception as e:
90
  print(f"Error running agent on task {task_id}: {e}")
91
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
 
 
92
 
93
  if not answers_payload:
94
  print("Agent did not produce any answers to submit.")
 
5
  from dotenv import load_dotenv
6
  from agent import Agent
7
  import pandas as pd
8
+ import time
9
 
10
  # (Keep Constants as is)
11
  # --- Constants ---
 
90
  except Exception as e:
91
  print(f"Error running agent on task {task_id}: {e}")
92
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
93
+ # wait 60s before next question
94
+ time.sleep(60)
95
 
96
  if not answers_payload:
97
  print("Agent did not produce any answers to submit.")