Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .codex
Empty file.
4 changes: 2 additions & 2 deletions ais_bench/benchmark/configs/datasets/textvqa/textvqa_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer
from ais_bench.benchmark.datasets import TEXTVQADataset, TEXTEvaluator, TEXTEvaluatorForVita


Comment thread
wenba0 marked this conversation as resolved.
PROMPT = "Answer the question using a single word or phrase."
textvqa_reader_cfg = dict(
input_columns=['question', 'image'],
output_column='answer'
Expand All @@ -16,7 +16,7 @@
template=dict(
round=[
dict(role="HUMAN", prompt_mm={
"text": {"type": "text", "text": "{question} Answer the question using a single word or phrase."},
"text": {"type": "text", "text": f"{{question}} {PROMPT}"},
"image": {"type": "image_url", "image_url": {"url": "file://{image}"}},
})
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ais_bench.benchmark.openicl.icl_inferencer import GenInferencer
from ais_bench.benchmark.datasets import TEXTVQADataset, TEXTEvaluator

PROMPT = "Answer the question using a single word or phrase."

textvqa_reader_cfg = dict(
input_columns=['question', 'image'],
Expand All @@ -16,7 +17,7 @@
template=dict(
round=[
dict(role="HUMAN", prompt_mm={
"text": {"type": "text", "text": "{question} Answer the question using a single word or phrase."},
"text": {"type": "text", "text": f"{{question}} {PROMPT}"},
"image": {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,{image}"}},
})
]
Expand Down
Loading