frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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: If I cancel Codex today whats the next best local inference agent?

4•Bulbasaur2015•53m ago•2 comments

Ask HN: Any advice on how to learn good software architecture practices?

6•jimsojim•1h ago•2 comments

Ask HK: How are you building AI apps today?

4•Mnexium•3h ago•4 comments

Ask HN: What Is an "AI Engineer"?

16•seattle_spring•1d ago•27 comments

Ask HN: Does Claude Code remove the need for so many front-end frameworks?

7•ex-aws-dude•20h ago•10 comments

Ask HN: Are Tech Meetups Dead?

35•mlinhares•5d ago•29 comments

Ask HN: I found out that I'm about to be laid off. How do people find jobs?

21•wwwthrowaway256•1d ago•15 comments

A disk-first C++ vector engine

4•saeedq•18h ago•0 comments

Garnix, the Nix CI, is shutting down

12•cinericius•1d ago•4 comments

Do not use Cloudflare DNS regsitrar

10•talkingtab•20h ago•1 comments

Ask HN: How do you feel about posts about GenAI taking over the HN front page?

11•blenderob•1d ago•15 comments

Train 1T parameter LLM with 8 GPUs?

3•kendy1992•1d ago•1 comments

Ask HN: Why not have an EU browser?

6•osigurdson•1d ago•20 comments

Ask HN: Is anyone working at least 4 hours daily on an Apple Vision Pro?

152•widenrun•3d ago•108 comments

Sqlit – A lazygit-style TUI for SQL databases

20•MaxTeabag•3d ago•5 comments

Ask HN: How do you model temporarily invalid data structures

5•escot•2d ago•1 comments

Did the Linux memory management maintainer "just quit"?

17•hliyan•3d ago•3 comments

Ask HN: When and why did you start believing in God?

27•dvrp•3d ago•90 comments

Ask HN: Why didn't the C64 come with Simons' BASIC in the box from 1983 onward?

15•amichail•4d ago•14 comments

Ask HN: Did Messages get removed from Google Takeout?

22•MollyRealized•5d ago•1 comments

You've reached the end!