frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Ask HN: ReAct vs. Planning Pattern

4•hairymouse•2h ago•1 comments

Tell HN: Pretending not to use AI has made me a better developer

7•throwaway260803•2h ago•3 comments

Local, Open source AI meeting recorder that sees and hears everything

6•puremetrics•15h ago•3 comments

Ask HN: Early Feedback on Dez?

2•alexander2002•2h ago•3 comments

Ask HN: Have LLMs Plateaued?

7•leandrobon•16h ago•19 comments

New open sourced eval tool for building agents

2•Thomeras•12h ago•2 comments

Ask HN: Anyone still do work on Intel Macs?

21•senor_digimon•1d ago•28 comments

Tips for Landing a YC Internship?

6•cnnadozi•20h ago•9 comments

Ask HN: What's Next for LLMs?

4•apatheticonion•19h ago•5 comments

Tell HN: Amazonbot aggressively scraping my website and ignoring robots.txt

20•pera•2d ago•20 comments

Best way to avoid bloat and AI – selfcontaining OS

11•bialamusic•1d ago•3 comments

What is the downside of coaching that I may not be seeing yet?

6•ikut3hva•1d ago•1 comments

Ask HN: I still don't understand why AI agents need "skills"

14•skeptic_ai•1d ago•15 comments

Ask HN: How are you using AI to learn?

9•mfalcon•1d ago•23 comments

Tell HN: HackerOne Announces Mandatory identity verification

17•0xmattf•3d ago•1 comments

Strategic Oil Reserves Down to a Record Low Two-Week Supply

23•megamike•3d ago•21 comments

Ask HN: What's Your BHAG?

8•sudo_cowsay•1d ago•12 comments

Ask HN: When will ChatGPT Voice be able to control my phone?

2•spapas82•1d ago•7 comments

You've reached the end!

Open in hackernews

Ask HN: Best on device LLM tooling for PDFs?

4•martinald•1y ago
I've got very used to using the "big" LLMs for analysing PDFs

Now llama.cpp has vision support; I tried out PDFs with it locally (via LM Studio) but the results weren't as good as I hoped for. One time it insisted it couldn't do "OCR", but gave me an example of what the data _could_ look like - which was the data.

The other major problem is sometimes PDFs are actually made up of images; and it got super confused on those as well.

Given this is so new I'm struggling to find any tools which make this easier.

Comments

raymond_goo•1y ago
Try something like this

  !pip install pytesseract pdf2image pillow
  !apt install poppler-utils
  #!apt install tesseract-ocr
  from pdf2image import convert_from_path
  import pytesseract

  pages = convert_from_path('k.pdf', dpi=300)

  all_text = ""
  for page_num, img in enumerate(pages, start=1):
      text = pytesseract.image_to_string(img)
      all_text += f"\n--- Page {page_num} ---\n{text}"

  print(all_text)
constantinum•1y ago
give https://pg.llmwhisperer.unstract.com/ a try