frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Advice buying local AI machine

5•jay_kyburz•5h ago•8 comments

Ask HN: What software and hardware are you sing for self hosted LLM rigs?

35•NegativeLatency•1d ago•14 comments

Ask HN: When do you find it sane to delegate to AI?

5•couleur•10h ago•9 comments

Ask HN: What cool smart home integrations do you have?

4•janalsncm•6h ago•3 comments

Ask HN: What's your favorite sci-fi book about life after the singularity?

3•coreyrab•4h ago•2 comments

Ask HN: What would make ads on a web site more tolerable?

4•psion•12h ago•14 comments

Ask HN: Android takes 14GB on my phone. Why does it not include a manual?

18•RetroTechie•1d ago•6 comments

Ask HN: How can you prepare for the coming security apocalypse?

12•DeepLogin•16h ago•20 comments

Ask HN: If 2048-bit RSA were cracked, what would be the consequences?

11•partsch•1d ago•7 comments

Ask HN: Where is all the amazing AI-generated software?

36•8bitbeep•5d ago•68 comments

Ask HN: Why bother with new programming languages?

16•avilay•2d ago•21 comments

Ask HN: Founders who shut down a company, what did you do with the code?

8•sethross•1d ago•6 comments

Ask HN: Is RSA in Jeopardy?

26•lyfeninja•5d ago•17 comments

Tell HN: Don't use AI to write your comments or they'll get automatically killed

44•nathan_f77•2d ago•67 comments

DNS Made Easy: Reset Your Password and Generate New API Keys

8•jinnko•1d ago•3 comments

Ask HN: Any courses/products by indie makers worth getting today?

85•akudha•4d ago•43 comments

DietPi released a new version v10.9

21•stephanstsdietp•4d ago•3 comments

Ask HN: Coworker rejects PR (a month in) because it does not meet his standards

23•LandOfMightDev•1w ago•46 comments

Ask HN: Who is still worried about copyright issues with AI generated code?

6•sonjaqql•2d ago•8 comments

Why does Claude have a 4 hour limit?

8•tombakerbuilds•1d ago•3 comments

Ask HN: Why haven't LLMs made any CS breakthroughs?

10•elcritch•2d ago•5 comments

If you're doing Monte Carlo try Knuth LGC

8•logicallee•3d ago•1 comments

Ask HN: Is anyone using Gemini Live (3.8) in scaled production

5•aenis•2d ago•0 comments

Ask HN: Am I the only one whose AI hype is cooling down a lot?

41•redleathercouch•6d ago•30 comments

Ask HN: Is ChatGPT output format for chats purposely nerfed?

3•MrCoffee7•2d ago•12 comments

Ask HN: What would you do at your company if RSA rumor comes out true?

4•gouterz•1d ago•2 comments

Ask HN: How do you handle corporate life?

11•busssard•4d ago•10 comments

Ask HN: How do you find meaning of life at 41?

76•BTA_DoIt•4d ago•129 comments

Ask HN: Users asking to remove their commits under GDPR

10•punkpeye•3d ago•6 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