Image-Text-to-Text
PaddleOCR
Safetensors
English
Chinese
multilingual
paddleocr_vl
ERNIE4.5
PaddlePaddle
image-to-text
ocr
document-parse
layout
table
formula
chart
conversational
custom_code
Eval Results
Instructions to use PaddlePaddle/PaddleOCR-VL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PaddleOCR-VL with PaddleOCR:
# See https://www.paddleocr.ai/latest/version3.x/pipeline_usage/PaddleOCR-VL.html to installation from paddleocr import PaddleOCRVL pipeline = PaddleOCRVL(pipeline_version="v1") output = pipeline.predict("path/to/document_image.png") for res in output: res.print() res.save_to_json(save_path="output") res.save_to_markdown(save_path="output") - Notebooks
- Google Colab
- Kaggle
| {%- if not add_generation_prompt is defined -%} | |
| {%- set add_generation_prompt = true -%} | |
| {%- endif -%} | |
| {%- if not cls_token is defined -%} | |
| {%- set cls_token = "<|begin_of_sentence|>" -%} | |
| {%- endif -%} | |
| {%- if not eos_token is defined -%} | |
| {%- set eos_token = "</s>" -%} | |
| {%- endif -%} | |
| {{- cls_token -}} | |
| {%- for message in messages -%} | |
| {%- if message["role"] == "user" -%} | |
| {{- "User: " -}} | |
| {%- for content in message["content"] -%} | |
| {%- if content["type"] == "image" -%} | |
| {{ "<|IMAGE_START|><|IMAGE_PLACEHOLDER|><|IMAGE_END|>" }} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- for content in message["content"] -%} | |
| {%- if content["type"] == "text" -%} | |
| {{ content["text"] }} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {{ "\n" -}} | |
| {%- elif message["role"] == "assistant" -%} | |
| {{- "Assistant: " -}} | |
| {%- for content in message["content"] -%} | |
| {%- if content["type"] == "text" -%} | |
| {{ content["text"] }} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {{ eos_token -}} | |
| {%- elif message["role"] == "system" -%} | |
| {%- for content in message["content"] -%} | |
| {%- if content["type"] == "text" -%} | |
| {{ content["text"] + "\n" }} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- endif -%} | |
| {%- endfor -%} | |
| {%- if add_generation_prompt -%} | |
| {{- "Assistant: " -}} | |
| {%- endif -%} | |