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 the most promising RL fields for a new master student?

26•zecice•3h ago•10 comments

Ask HN: Is an in-page speed reader useful?

2•jvbotelho•52m ago•2 comments

Ask HN: I spent personal money on game dev. How to turn stalled project around?

2•pixelbyindex•1h ago•1 comments

Ask HN: Are you using Rust on embedded devices yet? If not, why?

7•mempirate•4h ago•1 comments

Ask HN: Graal VM Relevance

4•sid_op•3h ago•0 comments

Ask HN: Something fishy is going on with Google feed on my Android

4•motbus3•4h ago•0 comments

Ask HN: Why don't we solve aging?

5•goldlimetea•4h ago•24 comments

Searchable, leveled learning map of AI/ML tools

2•maneeshthakur•5h ago•1 comments

ASK HN: Why has technology become so unreliable?

5•prmph•5h ago•9 comments

Ask HN: Protecting your Sites/Services from Unwanted Traffic?

10•prologic•11h ago•6 comments

Connection-Agnostic Presence Tracking for Stateless Distributed Back Ends

5•duckydude20•9h ago•0 comments

I built a jav data API, need honest feedback

2•javinfo•7h ago•0 comments

Ask HN: What livestream do you keep open in a tab?

47•missmoss•23h ago•16 comments

YouTube Comments in .csv

2•cristyg0101•8h ago•0 comments

Ask HN: Is Your Work Relaxing?

3•julienreszka•9h ago•0 comments

Ask HN: Which Jabber clients support SCRAM+ and XEP-0474

12•Bender•23h ago•0 comments

Timed YouTube video transcripts in .txt and .pdf

7•cristyg0101•1d ago•4 comments

Ask HN: HotPin – lossless 120B MoE inference on 24GB RAM (CPU, 50 loc)

10•LozzKappa•22h ago•0 comments

What happens behind the scenes when we change effort for same LLM models?

13•tbharath•1d ago•8 comments

Who's making money from using/exploiting AI?

10•jonthepirate•1d ago•4 comments

Tell HN: Namecheap gave my account to an unverified third party

489•Thrashed•2d ago•175 comments

Ask HN: What do you do when your AI agents are working?

8•mavsman•22h ago•5 comments

Ask HN: How to get your open-source project gain popularity?

4•Hussain04•23h ago•12 comments

Books can't piss me off

10•emerongi•16h ago•6 comments

Ask HN: What happens when we do compress the context in Claude Code?

6•tbharath•1d ago•4 comments

Ask HN: Is neuromorphic computing going to replace traditional AI?

5•lennart-rth•1d ago•2 comments

Ask HN: What do you watch during lunch or dinner, if you're by yourself?

5•MinimalAction•18h ago•18 comments

Is AI used in school system and how are they implementing it

3•rohankc_01•18h ago•2 comments

Ask HN: What's expected from an engineering manager or director now?

3•agentwrangler•19h ago•4 comments

Postgress in Rust

4•poldex•1d ago•2 comments