Jofthomas commited on
Commit
a9f9e3a
·
verified ·
1 Parent(s): c638053

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -4
main.py CHANGED
@@ -16,13 +16,17 @@ step_threshold = 5
16
  HF_DATASET_ID = "agents-course/unit4-students-scores"
17
  # Ensure you have write access to this dataset repository on Hugging Face
18
  # and are logged in via `huggingface-cli login` or have HF_TOKEN env var set.
19
-
 
 
20
  # --- Logging Setup ---
21
  logging.basicConfig(level=logging.INFO)
22
  logger = logging.getLogger(__name__)
23
  filtered_dataset=None
24
  def load_dataset():
25
  global filtered_dataset
 
 
26
  tempo_filtered=[]
27
  dataset=load_dataset("gaia-benchmark/GAIA","2023_level1",trust_remote_code=True)
28
  for question in dataset['validation']:
@@ -53,9 +57,7 @@ def load_dataset():
53
  print("------------------------------------------------------------------")
54
  filtered_dataset=tempo_filtered
55
 
56
- # Prepare data structures for the API
57
- questions_for_api: List[Dict[str, str]] = []
58
- ground_truth_answers: Dict[str, str] = {}
59
 
60
  for item in filtered_dataset:
61
  task_id = item.get('task_id')
 
16
  HF_DATASET_ID = "agents-course/unit4-students-scores"
17
  # Ensure you have write access to this dataset repository on Hugging Face
18
  # and are logged in via `huggingface-cli login` or have HF_TOKEN env var set.
19
+ # Prepare data structures for the API
20
+ questions_for_api: List[Dict[str, str]] = []
21
+ ground_truth_answers: Dict[str, str] = {}
22
  # --- Logging Setup ---
23
  logging.basicConfig(level=logging.INFO)
24
  logger = logging.getLogger(__name__)
25
  filtered_dataset=None
26
  def load_dataset():
27
  global filtered_dataset
28
+ global questions_for_api
29
+ global ground_truth_answers
30
  tempo_filtered=[]
31
  dataset=load_dataset("gaia-benchmark/GAIA","2023_level1",trust_remote_code=True)
32
  for question in dataset['validation']:
 
57
  print("------------------------------------------------------------------")
58
  filtered_dataset=tempo_filtered
59
 
60
+
 
 
61
 
62
  for item in filtered_dataset:
63
  task_id = item.get('task_id')