Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -18,6 +18,8 @@ def download_and_get_path_for_provided_file(path: str) -> str:
|
|
| 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(
|
|
@@ -30,9 +32,6 @@ def download_and_get_path_for_provided_file(path: str) -> str:
|
|
| 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 |
|
| 38 |
@tool
|
|
|
|
| 18 |
bytes: The binary content of the downloaded file
|
| 19 |
|
| 20 |
"""
|
| 21 |
+
from huggingface_hub import hf_hub_download
|
| 22 |
+
|
| 23 |
for dataset in ["test","validation"]:
|
| 24 |
try:
|
| 25 |
file_path = hf_hub_download(
|
|
|
|
| 32 |
except Exception as e:
|
| 33 |
continue
|
| 34 |
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
|
| 37 |
@tool
|