mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-23 16:54:56 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
22884d2bf7
commit
d84e3c70b7
16 changed files with 270 additions and 143 deletions
|
|
@ -77,15 +77,19 @@ class MMBench(EvalBase):
|
|||
|
||||
content = []
|
||||
if image_base64:
|
||||
content.append({
|
||||
"type": "image_url",
|
||||
"image_url": {"url": f"data:image/png;base64,{image_base64}"},
|
||||
})
|
||||
content.append(
|
||||
{
|
||||
"type": "image_url",
|
||||
"image_url": {"url": f"data:image/png;base64,{image_base64}"},
|
||||
}
|
||||
)
|
||||
content.append({"type": "text", "text": prompt})
|
||||
|
||||
return [{"role": "user", "content": content}]
|
||||
|
||||
def extract_answer(self, response: str, num_choices: int) -> Tuple[Optional[str], str]:
|
||||
def extract_answer(
|
||||
self, response: str, num_choices: int
|
||||
) -> Tuple[Optional[str], str]:
|
||||
valid_letters = set(ascii_uppercase[:num_choices])
|
||||
|
||||
letter, method = extract_letter_from_answer_tag(response, valid_letters)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue