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•12mo ago
give https://pg.llmwhisperer.unstract.com/ a try

Ask HN: Is grpcurl home page compromised?

2•jicea•41m ago•0 comments

Ask HN: How are agentic workflows meant to offset AI debt?

2•l33tbro•21m ago•0 comments

Did moving to new place have intended effect?

7•Jeff2Serve•9h ago•6 comments

Ask HN: Go all in on startup idea, or stay W2

2•Mnexium•6h ago•14 comments

Ask HN: How to be SOC2 Type 2 compliant as a solo-entreprenuer?

171•sochix•4d ago•136 comments

Ask HN: How often do you code the expected way instead of a better one?

4•recycling•9h ago•4 comments

Windows on Mobile Screen

2•tukunjil•9h ago•0 comments

Ask HN: How to enforce engineers to understand the code they are shipping

5•hchua•11h ago•13 comments

Ask HN: Do you know what data your AI coding agent sends to the cloud?

5•lbrauer•1d ago•6 comments

Ask HN: When did computers stop being fun?

70•klez•2d ago•102 comments

Ask HN: Company is rapidly cutting AI tool spend how to prep team?

7•Snakes3727•16h ago•11 comments

Tell HN: Dont use Claude Design, lost access to my projects after unsubscribing

298•pycassa•5d ago•85 comments

Tell HN: Mindie.dev is scraping emails from profiles to send spam

26•stackghost•2d ago•6 comments

Ask HN: Could free/low cost LLMs be a momentary thing?

5•senda•1d ago•11 comments

SlothDB is an OLAP DB ahead of DuckDB on Clickbench SQL database in C++20

6•souravroy78•2d ago•4 comments

Ask HN: What LLM models are you using and why?

10•rubyn00bie•2d ago•13 comments

Viable open source Claude Design alternative?

26•splatzone•5d ago•7 comments

Which country will be the first to pass laws limiting Meta Ray-Ban glasses?

30•nothrowaways•5d ago•10 comments

Ask HN: What are you working on (non-AI)?

46•BrunoBernardino•6d ago•58 comments

You've reached the end!