mirror of
https://github.com/allenai/olmocr.git
synced 2025-11-03 03:25:22 +00:00
Flipping prompt around to be before image, so we can cache on runtime
This commit is contained in:
parent
df52cb0e0e
commit
897668d21d
@ -129,8 +129,8 @@ async def build_page_query(local_pdf_path: str, page: int, target_longest_image_
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_base64}"}},
|
||||
{"type": "text", "text": build_no_anchoring_yaml_prompt()},
|
||||
{"type": "image_url", "image_url": {"url": f"data:image/png;base64,{image_base64}"}},
|
||||
],
|
||||
}
|
||||
],
|
||||
|
||||
@ -417,8 +417,8 @@ class InstructUserMessages(PipelineStep):
|
||||
messages = {
|
||||
"role": "user",
|
||||
"content": [
|
||||
{"type": "image", "image": sample["image"]},
|
||||
{"type": "text", "text": sample["instruction_prompt"]},
|
||||
{"type": "image", "image": sample["image"]},
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user