Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
ab4518a
1
Parent(s):
5e9f7f7
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
|
|
7 |
import pandas as pd
|
8 |
import numpy as np
|
9 |
|
10 |
-
from datasets import load_dataset
|
11 |
from apscheduler.schedulers.background import BackgroundScheduler
|
12 |
from huggingface_hub import HfApi
|
13 |
|
@@ -31,8 +31,8 @@ YEAR_VERSION = "2023"
|
|
31 |
os.makedirs("scored", exist_ok=True)
|
32 |
|
33 |
# Display the results
|
34 |
-
eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload",
|
35 |
-
contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload",
|
36 |
def get_dataframe_from_results(eval_results, split):
|
37 |
local_df = eval_results[split]
|
38 |
local_df = local_df.map(lambda row: {"model": model_hyperlink(row["url"], row["model"])})
|
@@ -176,7 +176,7 @@ def add_new_eval(
|
|
176 |
|
177 |
|
178 |
def refresh():
|
179 |
-
eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload",
|
180 |
eval_dataframe_val = get_dataframe_from_results(eval_results=eval_results, split="validation")
|
181 |
eval_dataframe_test = get_dataframe_from_results(eval_results=eval_results, split="test")
|
182 |
return eval_dataframe_val, eval_dataframe_test
|
|
|
7 |
import pandas as pd
|
8 |
import numpy as np
|
9 |
|
10 |
+
from datasets import load_dataset, VerificationMode
|
11 |
from apscheduler.schedulers.background import BackgroundScheduler
|
12 |
from huggingface_hub import HfApi
|
13 |
|
|
|
31 |
os.makedirs("scored", exist_ok=True)
|
32 |
|
33 |
# Display the results
|
34 |
+
eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NONE, trust_remote_code=True)
|
35 |
+
contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NONE, trust_remote_code=True)
|
36 |
def get_dataframe_from_results(eval_results, split):
|
37 |
local_df = eval_results[split]
|
38 |
local_df = local_df.map(lambda row: {"model": model_hyperlink(row["url"], row["model"])})
|
|
|
176 |
|
177 |
|
178 |
def refresh():
|
179 |
+
eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NONE,trust_remote_code=True)
|
180 |
eval_dataframe_val = get_dataframe_from_results(eval_results=eval_results, split="validation")
|
181 |
eval_dataframe_test = get_dataframe_from_results(eval_results=eval_results, split="test")
|
182 |
return eval_dataframe_val, eval_dataframe_test
|