Spaces:
Running
Running
force download results on startup (#1)
Browse files- force download results on startup (7260480a5899e1c37b2d8153585a0a71ac410c5e)
Co-authored-by: Hussein Mozannar <hsseinmz@users.noreply.huggingface.co>
app.py
CHANGED
@@ -57,10 +57,11 @@ def format_dataframe(df):
|
|
57 |
df = df[["Model Name", "Accuracy", "Answer rate", "Precision", "EM", "Accuracy (easy)", "Accuracy (medium)", "Accuracy (hard)", "Base Model", "Organization"]]
|
58 |
return df
|
59 |
|
|
|
|
|
60 |
eval_dataframe_test = get_dataframe_from_results(eval_results=eval_results, split="test")
|
61 |
eval_dataframe_test = format_dataframe(eval_dataframe_test)
|
62 |
|
63 |
-
|
64 |
# Function to restart the space
|
65 |
def restart_space():
|
66 |
api.restart_space(repo_id=LEADERBOARD_PATH, token=TOKEN)
|
|
|
57 |
df = df[["Model Name", "Accuracy", "Answer rate", "Precision", "EM", "Accuracy (easy)", "Accuracy (medium)", "Accuracy (hard)", "Base Model", "Organization"]]
|
58 |
return df
|
59 |
|
60 |
+
|
61 |
+
eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", trust_remote_code=True)
|
62 |
eval_dataframe_test = get_dataframe_from_results(eval_results=eval_results, split="test")
|
63 |
eval_dataframe_test = format_dataframe(eval_dataframe_test)
|
64 |
|
|
|
65 |
# Function to restart the space
|
66 |
def restart_space():
|
67 |
api.restart_space(repo_id=LEADERBOARD_PATH, token=TOKEN)
|