Skip to content

Commit

Permalink
add crossed_text to vcr_wiki output
Browse files Browse the repository at this point in the history
  • Loading branch information
sheryc committed Jun 10, 2024
1 parent 043b483 commit 427dabb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lmms_eval/tasks/vcr_wiki/utils.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import datetime
import json
import logging
import os
from difflib import SequenceMatcher as SM
from functools import partial

import evaluate
import logging
import spacy
from spacy.cli import download
from nltk.util import ngrams
from functools import partial
import datetime
from spacy.cli import download

from lmms_eval.tasks._task_utils.file_utils import generate_submission_file
import json

# Download the English and Chinese models
download("en_core_web_sm")
Expand Down Expand Up @@ -193,6 +195,7 @@ def vcr_en_process_results(doc, results):
{
"score": tmp[k],
"max_sim_string": tmp["max_sim_string"],
"crossed_text": crossed_text[i],
"caption": doc["caption"],
}
)
Expand Down Expand Up @@ -224,6 +227,7 @@ def vcr_zh_process_results(doc, results):
{
"score": tmp[k],
"max_sim_string": tmp["max_sim_string"],
"crossed_text": crossed_text[i],
"caption": doc["caption"],
}
)
Expand Down

0 comments on commit 427dabb

Please sign in to comment.