Update utils.py
Browse files
utils.py
CHANGED
@@ -1,13 +1,18 @@
|
|
1 |
-
import
|
2 |
import pandas as pd
|
|
|
3 |
from docx import Document
|
4 |
from pptx import Presentation
|
5 |
|
6 |
def get_questions(file_path, level):
|
7 |
#df = pd.read_json(file_path, lines=True)
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
11 |
if level > 0:
|
12 |
df = df[df["Level"] == level]
|
13 |
|
|
|
1 |
+
import os
|
2 |
import pandas as pd
|
3 |
+
from datasets import load_dataset
|
4 |
from docx import Document
|
5 |
from pptx import Presentation
|
6 |
|
7 |
def get_questions(file_path, level):
|
8 |
#df = pd.read_json(file_path, lines=True)
|
9 |
|
10 |
+
###
|
11 |
+
token = os.getenv("HF_TOKEN")
|
12 |
+
login(token)
|
13 |
+
df = load_dataset("gaia-benchmark/GAIA", "2023_all", split="validation", trust_remote_code=True)
|
14 |
+
###
|
15 |
+
|
16 |
if level > 0:
|
17 |
df = df[df["Level"] == level]
|
18 |
|