Nitien commited on
Commit
288d981
·
verified ·
1 Parent(s): 4ef6745

Update gaia_agent.py

Browse files
Files changed (1) hide show
  1. gaia_agent.py +6 -19
gaia_agent.py CHANGED
@@ -280,6 +280,10 @@ def format_reasoning_trace(intermediate_results: List[Dict[str, Any]]) -> str:
280
  return "\n".join(trace_lines)
281
 
282
 
 
 
 
 
283
  def process_questions(questions_file: str = None, questions_list: List[str] = None) -> str:
284
  """
285
  Process multiple questions and save results to a file
@@ -363,24 +367,7 @@ def process_questions(questions_file: str = None, questions_list: List[str] = No
363
 
364
 
365
 
366
- if __name__ == "__main__":
367
 
368
- global llm
369
- # Example questions to process
370
- questions = [
371
-
372
- #"What is the square of the population of France in millions?",
373
- #"What is 50 plus 75?"
374
- ]
375
-
376
- # Process all questions
377
- output_file = process_questions(questions_list=questions)
378
 
379
- # Print the results
380
- print("\nResults from file:")
381
- with open(output_file, 'r') as f:
382
- for line in f:
383
- result = json.loads(line)
384
- print(f"\nTask ID: {result['task_id']}")
385
- print(f"Answer: {result['model_answer']}")
386
- print(f"Reasoning:\n{result['reasoning_trace']}")
 
280
  return "\n".join(trace_lines)
281
 
282
 
283
+ ##################################################################################################################
284
+ # For Local env.
285
+ ##################################################################################################################
286
+
287
  def process_questions(questions_file: str = None, questions_list: List[str] = None) -> str:
288
  """
289
  Process multiple questions and save results to a file
 
367
 
368
 
369
 
370
+ #if __name__ == "__main__":
371
 
372
+ # global llm
 
 
 
 
 
 
 
 
 
373