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: CAD for wood working with LLM support?

117•reacharavindh•2d ago•114 comments

Ask HN: Do you want a router that has DD-WRT pre-installed?

159•Ixander•4d ago•150 comments

Ask HN: Apple HomeView. What problem is Apple Home solving?

3•NarcisMirandes•10h ago•8 comments

Twitterwebviewer.net Is Back Online

2•orange999•5h ago•0 comments

Ask HN: Did you 'invest' in NFTs or memecoins?

7•agent008t•10h ago•9 comments

Ask HN: What is the black swan event that could bring down GPU costs?

3•whatdowecallu•5h ago•4 comments

Ask HN: Are you hesitant to install vibe-coded apps?

15•ex-aws-dude•1d ago•22 comments

Ask HN: Can I tell my managers to skip the corporate bs and get to the point?

10•nhgiang•20h ago•21 comments

Tell HN: Remember to migrate away from .name domain

8•nikanj•1d ago•5 comments

Ask HN: Where has creativity in software gone?

34•piratesAndSons•1d ago•22 comments

Ask HN: Demonstrating Skills When Everything Is a Prompt

5•Brisk4t•1d ago•1 comments

Domain Health

8•anjalibery•2d ago•2 comments

Tell HN: Don't mass spam employers with LLM generated emails

7•karamazov•1d ago•2 comments

Free and Open-Source Facebook Scraper – Lightweight, No Headless Browser

22•mhloo•3d ago•2 comments

Ask HN: Any secrets for reaching a human at large companies?

5•elebant•1d ago•4 comments

Ask HN: Many SWEngs out there are considering re-training

21•jrowilliams•1d ago•26 comments

Are there any more startups with real technical challenges?

4•artifix•1d ago•7 comments

Ask HN: Any way to remove ads in Apple apps?

6•mark_l_watson•1d ago•2 comments

Tell HN: ChatGPT on macOS grants local computer access to cloud account

8•lxgr•2d ago•1 comments

Ask HN: What do you think will be hot in 2027 with on-device AI

5•mrburton•1d ago•0 comments

Ask HN: How long before someone reverse-engineers Windows?

10•cromka•2d ago•6 comments

Ask HN: Only one link appearing on HN?

5•datas•22h ago•8 comments

You've reached the end!