Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -18,12 +18,20 @@ def download_and_get_path_for_provided_file(path: str):
|
|
| 18 |
bytes: The binary content of the downloaded file
|
| 19 |
|
| 20 |
"""
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
return file_path
|
| 28 |
|
| 29 |
|
|
|
|
| 18 |
bytes: The binary content of the downloaded file
|
| 19 |
|
| 20 |
"""
|
| 21 |
+
for dataset in ["test","validation"]:
|
| 22 |
+
try:
|
| 23 |
+
file_path = hf_hub_download(
|
| 24 |
+
repo_id="gaia-benchmark/GAIA",
|
| 25 |
+
filename=f"2023/{dataset}/{file_path}",
|
| 26 |
+
repo_type="dataset",
|
| 27 |
+
token=os.environ['HF_TOKEN'])
|
| 28 |
+
if file_path:
|
| 29 |
+
return file_path
|
| 30 |
+
except Exception as e:
|
| 31 |
+
continue
|
| 32 |
+
|
| 33 |
+
file_name = "99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3.mp3"
|
| 34 |
+
file_path = get_path(file_name)
|
| 35 |
return file_path
|
| 36 |
|
| 37 |
|