Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ def greet(name: str) -> str:
|
|
36 |
|
37 |
DATASET_VERSIONS = ['dev-set-1', 'dev-set-2']
|
38 |
|
|
|
39 |
|
40 |
|
41 |
|
@@ -43,10 +44,10 @@ class LeaderboardServer:
|
|
43 |
def __init__(self, server_address):
|
44 |
self.server_address = server_address
|
45 |
self.repo_type = "dataset"
|
46 |
-
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type)
|
47 |
|
48 |
def on_submit(self):
|
49 |
-
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type)
|
50 |
|
51 |
def get_leaderboard(self):
|
52 |
results = []
|
@@ -65,7 +66,8 @@ class LeaderboardServer:
|
|
65 |
path_or_fileobj=file,
|
66 |
path_in_repo=f"data/{filename}",
|
67 |
repo_id=self.server_address,
|
68 |
-
repo_type=self.repo_type
|
|
|
69 |
)
|
70 |
|
71 |
|
|
|
36 |
|
37 |
DATASET_VERSIONS = ['dev-set-1', 'dev-set-2']
|
38 |
|
39 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
40 |
|
41 |
|
42 |
|
|
|
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)
|
48 |
|
49 |
def on_submit(self):
|
50 |
+
self.local_leaderboard = snapshot_download(self.server_address,repo_type=self.repo_type, token=HF_TOKEN)
|
51 |
|
52 |
def get_leaderboard(self):
|
53 |
results = []
|
|
|
66 |
path_or_fileobj=file,
|
67 |
path_in_repo=f"data/{filename}",
|
68 |
repo_id=self.server_address,
|
69 |
+
repo_type=self.repo_type,
|
70 |
+
token=HF_TOKEN,
|
71 |
)
|
72 |
|
73 |
|