frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

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

Ask HN: What are you reading?

430•dan-bailey•1d ago•838 comments

Ask HN: What are you reading to your kids?

8•jopizio•16h ago•8 comments

Muse.ai gets me kicked off fb marketplace

29•zcalvin•14h ago•13 comments

Tell HN: Thanks for All the Fish

8•neilv•5h ago•0 comments

Factory AI vs. Cognition (Devin) board tussle

2•pranshuchittora•5h ago•1 comments

Ask HN: Who's still keeping a DOS machine up because the business depends on it?

293•mlaux•5d ago•300 comments

Ask HN: How will the AI endgame play out?

11•jackgavigan•17h ago•20 comments

Ask HN: Ex-swe what part time did you pickup?

2•conqrr•7h ago•0 comments

Ask HN: How do you get your first users for an MVP?

15•amina124•2d ago•11 comments

Ask HN: OpenSEO inspiration for other tools, asking for opinion

4•yash_salesup•1d ago•0 comments

Google now ships "ads" with their Android system update?

10•y42•1d ago•3 comments

Ask HN: Any nerds out there who've read a lot of research papers?

34•shriy-singh•6d ago•29 comments

Ask HN: What are people doing with their OpenClaw set ups now?

19•will10pa•3d ago•11 comments

Ask HN: IEEE expulsion of Fei-Yue Wang?

14•sathomasga•6d ago•2 comments

macOS 27: ifconfig command no longer prints hardware MAC address

7•luckman212•3d ago•14 comments

You've reached the end!