datakomarov commited on
Commit
cbe7f33
·
verified ·
1 Parent(s): 77975bf

save LB to a local dir

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -14,16 +14,17 @@ HF_TOKEN = os.getenv("HF_TOKEN")
14
 
15
  # Download from a dataset
16
 
17
- LEADERBOARD_PATH = hf_hub_download(repo_id="datakomarov/RAG-data", filename="leaderboard.csv", repo_type="dataset", token=HF_TOKEN)
18
 
19
  LB_COLUMNS = [
20
  "timestamp", "username", "team", "commit",
21
  "Answer not accepted", "Some truth", "Accepted answer", "valid_doc_ratio", "n",
22
  ]
23
 
24
- # def ensure_leaderboard():
25
- # if not os.path.exists(LEADERBOARD_PATH):
26
- #
 
27
 
28
  def load_corpus_ids():
29
  try:
 
14
 
15
  # Download from a dataset
16
 
17
+ hf_hub_download(repo_id="datakomarov/RAG-data", filename="leaderboard.csv", repo_type="dataset", token=HF_TOKEN, local_dir=".")
18
 
19
  LB_COLUMNS = [
20
  "timestamp", "username", "team", "commit",
21
  "Answer not accepted", "Some truth", "Accepted answer", "valid_doc_ratio", "n",
22
  ]
23
 
24
+ def ensure_leaderboard():
25
+ if not os.path.exists(LEADERBOARD_PATH):
26
+ print("Something's wrong with reading a LB")
27
+
28
 
29
  def load_corpus_ids():
30
  try: