zhiminy commited on
Commit
501e8a3
·
1 Parent(s): f59607e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -12
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
- repo_files = api.list_repo_files(repo_id=repo_name, repo_type="dataset")
336
-
337
- # Filter files by current year and month
338
- leaderboard_files = [file for file in repo_files if year_quarter in file]
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
  )