Update app.py
Browse files
app.py
CHANGED
@@ -332,18 +332,11 @@ def load_content_from_hf(repo_name="SE-Arena/votes"):
|
|
332 |
try:
|
333 |
api = HfApi()
|
334 |
# List all files in the repository
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
if not leaderboard_files:
|
341 |
-
raise FileNotFoundError(
|
342 |
-
f"No feedback files found for {year_quarter} in {repo_name}."
|
343 |
-
)
|
344 |
-
|
345 |
-
# Download and aggregate data
|
346 |
-
for file in leaderboard_files:
|
347 |
local_path = hf_hub_download(
|
348 |
repo_id=repo_name, filename=file, repo_type="dataset"
|
349 |
)
|
|
|
332 |
try:
|
333 |
api = HfApi()
|
334 |
# List all files in the repository
|
335 |
+
for file in api.list_repo_files(repo_id=repo_name, repo_type="dataset"):
|
336 |
+
# Filter files by current year and month
|
337 |
+
if year_quarter not in file:
|
338 |
+
continue
|
339 |
+
# Download and aggregate data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
local_path = hf_hub_download(
|
341 |
repo_id=repo_name, filename=file, repo_type="dataset"
|
342 |
)
|