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

I'm Eric Ries, author of "The Lean Startup" and new book "Incorruptible" – AMA

561•eries•13h ago•437 comments

Tell HN: Anthropic's Fable model is too expensive

5•hyhmrright•20m ago•3 comments

Notes on DeepSeek

132•vinhnx•13h ago•90 comments

AWS Bedrock to require sharing data with Anthropic for Mythos and future models

398•TomAnthony•19h ago•234 comments

Ask HN: Are most corporate SWE jobs performative?

209•hnthrow10282910•14h ago•246 comments

Why are there an increasing number of outright unhinged high karma users on HN?

8•MichaelZuo•1h ago•13 comments

Ask HN: Why hasn't there been a real competitor to Ticketmaster yet?

257•mdni007•2d ago•232 comments

Ask HN: Releasing code under AGPLv3, but want to block LLM reconstruction?

4•zionsati•2h ago•2 comments

Ask HN: Are you still using a Vision Pro?

164•y1n0•1d ago•211 comments

Ask HN: What are tools you have made for yourself since the advent of AI?

427•aryamaan•2d ago•735 comments

Why would someone want to learn code when AI does it better and faster?

4•manimonji•7h ago•7 comments

Ask HN: Would it be useful to have a slop button in addition to flag?

8•BugsJustFindMe•7h ago•5 comments

Ask HN: Favorite text heavy blogs the are a joy to read

37•joshmarinacci•1d ago•16 comments

Tell HN: Stack Overflow seems down

3•tom1337•12h ago•1 comments

Ask HN: The next evolutionary step in LLM usage?

2•tomaytotomato•12h ago•1 comments

AMA: I'm a Random HN User, ask me anything (and I might respond)

14•SpyCoder77•11h ago•33 comments

Will the next high value profession be people who can think independently?

5•ciwolex•6h ago•2 comments

Ask HN: Are we all walking into a trap?

6•skor•18h ago•14 comments

Tell HN: Codex once again automatically activates /fast on app update

2•mfi•18h ago•0 comments

Ask HN: How to escalate a rejected Google extension?

23•modzu•2d ago•14 comments

Ask HN: Prediction for SpaceX IPO?

7•bix6•1d ago•10 comments

Ask HN: Those who quit Software Eng. to do something else, what did you do?

4•trwhite•9h ago•0 comments

Ask HN: Why is the HN crowd so anti-AI?

458•Ekami•5d ago•760 comments

Ask HN: How do you cope when your startup contracts?

14•jasonephraim•2d ago•13 comments

Ask HN: Which companies gained a competitive edge purely via engineering?

5•j1000•2d ago•12 comments

Ask HN: What's your favorite HN Recap like podcast?

5•randomor•3d ago•2 comments

Ask HN: How are thinking efforts implemented?

26•simianwords•3d ago•18 comments

LeetCode is the best way to learn a new language

2•JasonHEIN•1d ago•4 comments

Ask HN: Options for critical thinking and learning outside work?

6•hnthrow10282910•2d ago•5 comments

Ask HN: How to get your child interested in math?

3•gitowiec•1d ago•7 comments