Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,13 +44,14 @@ class LeaderboardServer:
|
|
44 |
def __init__(self, server_address):
|
45 |
self.server_address = server_address
|
46 |
self.repo_type = "dataset"
|
47 |
-
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type, token=HF_TOKEN,local_dir = "
|
48 |
print(self.local_leaderboard)
|
49 |
def on_submit(self):
|
50 |
-
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type, token=HF_TOKEN,local_dir = "
|
51 |
|
52 |
def get_leaderboard(self):
|
53 |
results = []
|
|
|
54 |
for submission in glob.glob(os.path.join(self.local_leaderboard, "data") + "/*.json"):
|
55 |
data = json.load(open(submission))
|
56 |
submission_id = data["metadata"]["model_description"]
|
@@ -72,6 +73,7 @@ class LeaderboardServer:
|
|
72 |
|
73 |
|
74 |
|
|
|
75 |
leaderboard_server = LeaderboardServer(REPO)
|
76 |
|
77 |
|
|
|
44 |
def __init__(self, server_address):
|
45 |
self.server_address = server_address
|
46 |
self.repo_type = "dataset"
|
47 |
+
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type, token=HF_TOKEN,local_dir = "./")
|
48 |
print(self.local_leaderboard)
|
49 |
def on_submit(self):
|
50 |
+
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type, token=HF_TOKEN,local_dir = "./")
|
51 |
|
52 |
def get_leaderboard(self):
|
53 |
results = []
|
54 |
+
print(os.listdir(self.local_leaderboard))
|
55 |
for submission in glob.glob(os.path.join(self.local_leaderboard, "data") + "/*.json"):
|
56 |
data = json.load(open(submission))
|
57 |
submission_id = data["metadata"]["model_description"]
|
|
|
73 |
|
74 |
|
75 |
|
76 |
+
|
77 |
leaderboard_server = LeaderboardServer(REPO)
|
78 |
|
79 |
|