davanstrien HF staff commited on
Commit
faf676d
1 Parent(s): 7ea02f3

cache more

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -20,6 +20,7 @@ def fetch_data(dataset_name: str, workspace: str):
20
  return client.datasets(dataset_name, workspace=workspace)
21
 
22
 
 
23
  def get_progress(dataset) -> dict:
24
  records = list(dataset.records)
25
  total_records = len(records)
@@ -34,6 +35,7 @@ def get_progress(dataset) -> dict:
34
  }
35
 
36
 
 
37
  def get_leaderboard(dataset) -> dict:
38
  user_annotations = {}
39
  for record in dataset.records:
 
20
  return client.datasets(dataset_name, workspace=workspace)
21
 
22
 
23
+ @cached(cache)
24
  def get_progress(dataset) -> dict:
25
  records = list(dataset.records)
26
  total_records = len(records)
 
35
  }
36
 
37
 
38
+ @cached(cache)
39
  def get_leaderboard(dataset) -> dict:
40
  user_annotations = {}
41
  for record in dataset.records: