Log in
Log into community
Find answers from the community
View all posts
Related posts
Was this helpful?
π
π
π
Powered by
Hall
Inactive
Updated last year
0
Follow
Is there a loader that uses OCR as
Is there a loader that uses OCR as
Inactive
0
Follow
At a glance
v
velocitybolt
last year
Β·
Is there a loader that uses OCR as default to scan pdfs and includes metadata like page numbers and filename?
1
b
v
L
16 comments
Share
Open in Discord
b
bmax
last year
https://llamahub.ai/l/nougat_ocr
v
velocitybolt
last year
reader = PDFNougatOCR()
pdf_path = Path(directory_path + 'my_pdf.pdf')
documents = reader.load_data(pdf_path)
v
velocitybolt
last year
gets the error: ERROR:root:An error occurred while processing the PDF: [Errno 2] No such file or directory: 'nougat'
v
velocitybolt
last year
am i supposed to just only have a single string with the full path? or is this some kind of issue with the import
b
bmax
last year
yeah whats your directory path? seems like it doesn't exist
v
velocitybolt
last year
i was missing a requirement which solved that error
v
velocitybolt
last year
but wow this takes forever to run on 1 pdf if you are using CPU
b
bmax
last year
yes need gpu!
b
bmax
last year
its pretty good tho
v
velocitybolt
last year
any suggestions for MAC ppl?
L
Logan M
last year
most OCR models that are worth it are going to use GPU π
Although I don't think theres a loader for tesseract, so you'd have to create the document objects yourself (it's really not that hard though π )
b
bmax
last year
@velocitybolt @Logan M use colab? is there a way to make nougat use mac's gpu's (m2/m1)?
b
bmax
last year
I think logan once told me
model.to("mps:0")
L
Logan M
last year
nougat tries to use mps automatically under the hood, but I couldn't get it to work on my M2 π€ (its all in some external library)
colab is a good option
A
Asma_brb
11 months ago
hello, do you have any code to help me with, i am using colab and this is not really working for me from llama_index import PDFNougatOCR
Initialize the PDFNougatOCR reader
pdf_reader = PDFNougatOCR()
A
Asma_brb
11 months ago
as i want to convert the non modifiable pdf to modifiable onces to use them in my RAG
Add a reply
Sign up and join the conversation on Discord
Join on Discord