Spaces:
Sleeping
Sleeping
save LB to a local dir
Browse files
app.py
CHANGED
|
@@ -14,16 +14,17 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
| 14 |
|
| 15 |
# Download from a dataset
|
| 16 |
|
| 17 |
-
|
| 18 |
|
| 19 |
LB_COLUMNS = [
|
| 20 |
"timestamp", "username", "team", "commit",
|
| 21 |
"Answer not accepted", "Some truth", "Accepted answer", "valid_doc_ratio", "n",
|
| 22 |
]
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 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:
|