e904b667c6
PaddleOCR PR Tests GPU / test-pr-gpu (push) Blocked by required conditions
PaddleOCR PR Tests / test-pr (push) Blocked by required conditions
PaddleOCR PR Tests / test-pr-python (3.8) (push) Waiting to run
Build/Publish Develop Docs / deploy (push) Failing after 1s
PaddleOCR Code Style Check / check-code-style (push) Failing after 1s
PaddleOCR PR Tests GPU / detect-changes (push) Failing after 1s
PaddleOCR PR Tests GPU / test-pr-gpu-impl (push) Waiting to run
PaddleOCR PR Tests / detect-changes (push) Failing after 1s
PaddleOCR PR Tests / test-pr-python (3.13) (push) Waiting to run
PaddleOCR PR Tests / test-pr-python (3.9) (push) Waiting to run
langchain-paddleocr
This package provides access to PaddleOCR's capabilities within the LangChain ecosystem.
Quick Install
pip install langchain-paddleocr
Basic Usage
PaddleOCRVLLoader
The PaddleOCRVLLoader enables you to:
- Extract text and layout information from PDF and image files using models from Baidu's PaddleOCR-VL series (e.g., PaddleOCR-VL, PaddleOCR-VL-1.5, PaddleOCR-VL-1.6)
- Process documents from local files or remote URLs
Basic usage of PaddleOCRVLLoader looks as follows:
from langchain_paddleocr import PaddleOCRVLLoader
from pydantic import SecretStr
loader = PaddleOCRVLLoader(
file_path="path/to/document.pdf",
base_url="your-api-endpoint",
model="PaddleOCR-VL-1.5",
access_token=SecretStr("your-access-token") # Optional if using environment variable `PADDLEOCR_ACCESS_TOKEN`
)
docs = loader.load()
for doc in docs[:2]:
print(f"Content: {doc.page_content[:200]}...")
print(f"Source: {doc.metadata['source']}")
print("---")
📖 Documentation
For full documentation, see the LangChain Docs.