Spaces:
Running
Running
XufengDuan
commited on
Commit
•
caa4425
1
Parent(s):
18716bc
updated scripts
Browse files
app.py
CHANGED
@@ -10,25 +10,25 @@ import src.envs as envs
|
|
10 |
import src.populate as populate
|
11 |
import src.submission.submit as submit
|
12 |
import os
|
13 |
-
TOKEN = os.environ.get("
|
14 |
print("TOKEN", TOKEN)
|
15 |
def restart_space():
|
16 |
envs.API.restart_space(repo_id=envs.REPO_ID, token=TOKEN)
|
17 |
|
18 |
-
try:
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
except Exception:
|
24 |
-
|
25 |
-
try:
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
except Exception:
|
31 |
-
|
32 |
|
33 |
raw_data, original_df = populate.get_leaderboard_df(envs.RESULTS_REPO, envs.QUEUE_REPO, utils.COLS, utils.BENCHMARK_COLS)
|
34 |
leaderboard_df = original_df.copy()
|
|
|
10 |
import src.populate as populate
|
11 |
import src.submission.submit as submit
|
12 |
import os
|
13 |
+
TOKEN = os.environ.get("H4_TOKEN", None)
|
14 |
print("TOKEN", TOKEN)
|
15 |
def restart_space():
|
16 |
envs.API.restart_space(repo_id=envs.REPO_ID, token=TOKEN)
|
17 |
|
18 |
+
# try:
|
19 |
+
# print(envs.EVAL_REQUESTS_PATH)
|
20 |
+
# snapshot_download(
|
21 |
+
# repo_id=envs.QUEUE_REPO, local_dir=envs.EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
|
22 |
+
# )
|
23 |
+
# except Exception:
|
24 |
+
# restart_space()
|
25 |
+
# try:
|
26 |
+
# print(envs.EVAL_RESULTS_PATH)
|
27 |
+
# snapshot_download(
|
28 |
+
# repo_id=envs.RESULTS_REPO, local_dir=envs.EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
|
29 |
+
# )
|
30 |
+
# except Exception:
|
31 |
+
# restart_space()
|
32 |
|
33 |
raw_data, original_df = populate.get_leaderboard_df(envs.RESULTS_REPO, envs.QUEUE_REPO, utils.COLS, utils.BENCHMARK_COLS)
|
34 |
leaderboard_df = original_df.copy()
|