mirror of
https://github.com/MervinPraison/PraisonAI.git
synced 2026-11-09 03:39:37 -10:00
14 lines
416 B
Python
14 lines
416 B
Python
# praisonai: skip=true
|
|
from praisonaiagents import OCRAgent
|
|
|
|
agent = OCRAgent()
|
|
|
|
# Extract with page selection (pages is 0-indexed)
|
|
result = agent.extract("https://arxiv.org/pdf/2201.04234", pages=[0, 1])
|
|
for page in result.pages:
|
|
print(f"Page {page.index}: {page.markdown[:200]}")
|
|
|
|
# Quick read - just get the text
|
|
text = agent.read("https://arxiv.org/pdf/2201.04234")
|
|
print(f"Total length: {len(text)} chars")
|