Blanca commited on
Commit
198517c
·
verified ·
1 Parent(s): 94c072e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -3
app.py CHANGED
@@ -38,7 +38,16 @@ os.makedirs("scored", exist_ok=True)
38
  LOCAL_DEBUG = False #not (os.environ.get("system") == "spaces")
39
 
40
  # Display the results
41
- eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
 
 
 
 
 
 
 
 
 
42
  contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
43
  def get_dataframe_from_results(eval_results, split):
44
  local_df = eval_results[split]
@@ -238,11 +247,20 @@ def add_new_eval(
238
 
239
 
240
  def refresh():
241
- eval_results = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS,trust_remote_code=True)
242
- eval_dataframe_test = get_dataframe_from_results(eval_results=eval_results, split="test")
 
 
 
 
 
 
 
 
243
  return eval_dataframe_test
244
 
245
 
 
246
  def upload_file(files):
247
  file_paths = [file.name for file in files]
248
  return file_paths
 
38
  LOCAL_DEBUG = False #not (os.environ.get("system") == "spaces")
39
 
40
  # Display the results
41
+ test_results = load_dataset(
42
+ RESULTS_DATASET,
43
+ YEAR_VERSION,
44
+ split="test",
45
+ token=TOKEN,
46
+ download_mode="force_redownload",
47
+ verification_mode=VerificationMode.NO_CHECKS,
48
+ trust_remote_code=True,
49
+ )
50
+ eval_results = {"test": test_results}
51
  contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
52
  def get_dataframe_from_results(eval_results, split):
53
  local_df = eval_results[split]
 
247
 
248
 
249
  def refresh():
250
+ test_results = load_dataset(
251
+ RESULTS_DATASET,
252
+ YEAR_VERSION,
253
+ split="test",
254
+ token=TOKEN,
255
+ download_mode="force_redownload",
256
+ verification_mode=VerificationMode.NO_CHECKS,
257
+ trust_remote_code=True,
258
+ )
259
+ eval_dataframe_test = get_dataframe_from_results(eval_results={"test": test_results}, split="test")
260
  return eval_dataframe_test
261
 
262
 
263
+
264
  def upload_file(files):
265
  file_paths = [file.name for file in files]
266
  return file_paths