Spaces:
Running
Running
Update src/saving_utils.py
Browse files- src/saving_utils.py +2 -2
src/saving_utils.py
CHANGED
|
@@ -8,7 +8,7 @@ script_dir = os.path.dirname(os.path.abspath(__file__)) # Directory of the runn
|
|
| 8 |
|
| 9 |
def save_results(method_name, benchmark_types, results, repo_id="mgyigit/probe-data", repo_type="space"):
|
| 10 |
#First, download files to be updated from {repo_id}
|
| 11 |
-
|
| 12 |
|
| 13 |
#Update local files
|
| 14 |
for benchmark_type in benchmark_types:
|
|
@@ -27,7 +27,7 @@ def save_results(method_name, benchmark_types, results, repo_id="mgyigit/probe-d
|
|
| 27 |
return 0
|
| 28 |
|
| 29 |
|
| 30 |
-
def
|
| 31 |
api = HfApi(token=os.getenv("api-key")) #load api-key secret
|
| 32 |
|
| 33 |
benchmark_types.append("leaderboard")
|
|
|
|
| 8 |
|
| 9 |
def save_results(method_name, benchmark_types, results, repo_id="mgyigit/probe-data", repo_type="space"):
|
| 10 |
#First, download files to be updated from {repo_id}
|
| 11 |
+
download_from_hub(benchmark_types, repo_id, repo_type)
|
| 12 |
|
| 13 |
#Update local files
|
| 14 |
for benchmark_type in benchmark_types:
|
|
|
|
| 27 |
return 0
|
| 28 |
|
| 29 |
|
| 30 |
+
def download_from_hub(benchmark_types, repo_id="mgyigit/probe-data", repo_type="space"):
|
| 31 |
api = HfApi(token=os.getenv("api-key")) #load api-key secret
|
| 32 |
|
| 33 |
benchmark_types.append("leaderboard")
|