Update app.py
Browse files
app.py
CHANGED
|
@@ -21,8 +21,8 @@ from content import format_error, format_warning, format_log, TITLE, INTRODUCTIO
|
|
| 21 |
TOKEN = os.environ.get("TOKEN", None)
|
| 22 |
|
| 23 |
OWNER="Blanca"
|
| 24 |
-
DATA_DATASET = f"{OWNER}/CQs-
|
| 25 |
-
INTERNAL_DATA_DATASET = f"{OWNER}/CQs-
|
| 26 |
SUBMISSION_DATASET = f"{OWNER}/submissions_internal"
|
| 27 |
SUBMISSION_DATASET_PUBLIC = f"{OWNER}/submissions_public"
|
| 28 |
#CONTACT_DATASET = f"{OWNER}/contact_info" # TODO: I should reactivate this
|
|
@@ -56,7 +56,7 @@ test_results = load_dataset(
|
|
| 56 |
verification_mode=VerificationMode.NO_CHECKS,
|
| 57 |
trust_remote_code=True,
|
| 58 |
)
|
| 59 |
-
eval_results =
|
| 60 |
# TODO: I should reactivate saving contact infos
|
| 61 |
#contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
|
| 62 |
def get_dataframe_from_results(eval_results, split):
|
|
@@ -220,6 +220,8 @@ def add_new_eval(
|
|
| 220 |
for id_to_eval, line in data.items():
|
| 221 |
intervention_score = 0
|
| 222 |
for indx, intervention_id in enumerate(gold_dataset['intervention_id']):
|
|
|
|
|
|
|
| 223 |
if id_to_eval == intervention_id:
|
| 224 |
references = gold_dataset['cqs']
|
| 225 |
reference_set = [row['cq'] for row in references[indx]]
|
|
|
|
| 21 |
TOKEN = os.environ.get("TOKEN", None)
|
| 22 |
|
| 23 |
OWNER="Blanca"
|
| 24 |
+
DATA_DATASET = f"{OWNER}/CQs-Gen_test_embeddings"
|
| 25 |
+
INTERNAL_DATA_DATASET = f"{OWNER}/CQs-Gen_test_embeddings
|
| 26 |
SUBMISSION_DATASET = f"{OWNER}/submissions_internal"
|
| 27 |
SUBMISSION_DATASET_PUBLIC = f"{OWNER}/submissions_public"
|
| 28 |
#CONTACT_DATASET = f"{OWNER}/contact_info" # TODO: I should reactivate this
|
|
|
|
| 56 |
verification_mode=VerificationMode.NO_CHECKS,
|
| 57 |
trust_remote_code=True,
|
| 58 |
)
|
| 59 |
+
eval_results['test'] = load_dataset(RESULTS_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
|
| 60 |
# TODO: I should reactivate saving contact infos
|
| 61 |
#contact_infos = load_dataset(CONTACT_DATASET, YEAR_VERSION, token=TOKEN, download_mode="force_redownload", verification_mode=VerificationMode.NO_CHECKS, trust_remote_code=True)
|
| 62 |
def get_dataframe_from_results(eval_results, split):
|
|
|
|
| 220 |
for id_to_eval, line in data.items():
|
| 221 |
intervention_score = 0
|
| 222 |
for indx, intervention_id in enumerate(gold_dataset['intervention_id']):
|
| 223 |
+
if indx == 3:
|
| 224 |
+
break
|
| 225 |
if id_to_eval == intervention_id:
|
| 226 |
references = gold_dataset['cqs']
|
| 227 |
reference_set = [row['cq'] for row in references[indx]]
|