File size: 658 Bytes
c40eaa2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from datasets import load_dataset
from huggingface_hub import hf_hub_download

task_id = "cca530fc-4052-43b2-b130-b30968d8aa44"

dataset = load_dataset(
    "gaia-benchmark/GAIA",
    "2023_level1",
    split="validation",
    trust_remote_code=True,
)

for item in dataset:
    if item["task_id"] == task_id:
        print("file_name:", item["file_name"])
        print("file_path:", item["file_path"])

        file_path = hf_hub_download(
            repo_id="gaia-benchmark/GAIA",
            repo_type="dataset",
            filename=item["file_path"],
            local_dir="attachments",
        )

        print("下载到:", file_path)
        break