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

The open source DOCX editor submitted to HN a few weeks ago has been deleted

83•gcanyon•8h ago•38 comments

Ask HN: Is "no source code was copied" still a sufficient copyright defense?

59•oscgam1•15h ago•69 comments

Ask HN: Where is the programming profession going?

136•syntaxbush•2d ago•150 comments

Tell Zillow: Fee-Simple vs. Leasehold Filter

3•HoldOnAMinute•8h ago•1 comments

Roblox parental controls are a dystopian security disaster

19•notsure357•11h ago•3 comments

Ask HN: Which AI concepts are here to stay, and which will churn?

3•datsci_est_2015•9h ago•4 comments

Ask HN: Techniques for learning things quickly using coding agents?

3•throwaw12•10h ago•1 comments

Ask HN: Norway bans AI in elementary schools

14•mellosty•1d ago•15 comments

Ask HN: How much coding should beginners learn in the AI era?

33•JohnDSDev•2d ago•45 comments

Ask HN: Who remembers Fry's Electronics – the "church" of IT people?

7•netfortius•19h ago•4 comments

Ask HN: How is GPU power draw measured at scale?

5•anax32•20h ago•2 comments

I feel like VSCode is falling apart

11•othmanosx•1d ago•14 comments

Ask HN: MacBook vs. Dedicated GPU for LLM

24•mzubairtahir•3h ago•45 comments

Ask HN: Why does every AI demo sound perfect but real world deployment always

7•VaderAi•1d ago•10 comments

Tell HN: OpenAI has started putting ads on paid programs

113•shantnutiwari•1d ago•64 comments

Decoupling Compute and Memory for Async GPUs

8•yiyingzhang•1d ago•2 comments

Ask HN: What home printer do you use/recommend?

18•niyazpk•3d ago•22 comments

Ask HN: What surprised you about Estonia e-Residency and running an Estonian OÜ?

80•jvilalta•1d ago•71 comments

My website gets more attacks than human visitors

5•tommy2970•1d ago•5 comments

Ask HN: Quickbooks Alternative?

5•bix6•1d ago•2 comments

Google AI overview for "keynesian economics" is written in Korean

4•something765478•1d ago•4 comments

Ask HN: Do you thank your agents when they did a good job?

7•ex-aws-dude•1d ago•12 comments

Ask HN: What are the hardest problems AWS Lambda MicroVMs can solve now?

6•iaziz786•2d ago•2 comments

As; HN: I was curious why MTP affects PP TPS in llama.cpp. My PoC recovers it?

3•i_am_rocoe•1d ago•1 comments

Ask HN: Anthropic banned me from using Claude Code and I don't know what to do

81•ayi•4d ago•93 comments

How to find AI-conservative companies to work for?

20•tossitawayplz•3d ago•12 comments

Ask HN: Yahoo deleted all my emails. Now what?

15•neya•3d ago•14 comments

Got access to Gemini's actual thinking

4•StizzurpXDD•1d ago•0 comments

Ask HN: Am I missing something with AI

18•vasko•3d ago•23 comments

Tell HN: I never bought anything from clicking on a paid ad

23•julienreszka•4d ago•29 comments