bstraehle commited on
Commit
77ef617
·
verified ·
1 Parent(s): d526924

Update utils/utils.py

Browse files
Files changed (1) hide show
  1. utils/utils.py +15 -2
utils/utils.py CHANGED
@@ -4,11 +4,24 @@ from docx import Document
4
  from pptx import Presentation
5
  from datasets import load_dataset
6
 
7
- def get_questions_from_file(file_path, level):
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  df = pd.read_json(file_path, lines=True)
9
 
10
  df = df[df["Level"] == level]
11
-
12
  result=[]
13
 
14
  for _, row in df.iterrows():
 
4
  from pptx import Presentation
5
  from datasets import load_dataset
6
 
7
+ QUESTION_TYPE_GAIA = "gaia"
8
+ QUESTION_TYPE_HLE = "hle"
9
+
10
+ QUESTION_FILE_PATH_GAIA = "files/gaia_validation.jsonl"
11
+ QUESTION_FILE_PATH_HLE = "files/hle_validation.jsonl"
12
+
13
+ def get_questions_from_file(question_type, level):
14
+ file_path = ""
15
+
16
+ if question_type == QUESTION_TYPE_GAIA:
17
+ file_path = QUESTION_FILE_PATH_GAIA
18
+ elif question_type == QUESTION_TYPE_HLE:
19
+ file_path = QUESTION_FILE_PATH_HLE
20
+
21
  df = pd.read_json(file_path, lines=True)
22
 
23
  df = df[df["Level"] == level]
24
+
25
  result=[]
26
 
27
  for _, row in df.iterrows():