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 in the world is taking Ubuntu so long?

199•linsomniac•16h ago•126 comments

Claude usage credits purchased after Dec 7 will expire 12 months after purchase

14•bbg2401•8h ago•5 comments

Tell HN: Gemini trains on chat history, even for subscribers (personal accounts)

725•jameslk•2d ago•197 comments

Ask HN: What's your current AI agentic setup?

545•eggbrain•2d ago•678 comments

Ask HN: What cryptography book do you recommend for reading with 10 year olds?

87•mike_richards•4d ago•82 comments

Tell HN: Be Careful with Stripe Connect

16•breue•10h ago•3 comments

Slickdeals.net Is Compromised

20•intenex•12h ago•1 comments

Ask HN: What fun things to do with an iPhone 11?

8•wanderingpixel•16h ago•5 comments

OpenAI seems to be silently re-enabling model training on Codex chats

529•user052919•3d ago•163 comments

Ask HN: What are forgotten topics in computing that deserve a new revisit?

42•draxen•1d ago•36 comments

Seeking advice: Wix stolen my .com domain

8•wixcom•19h ago•10 comments

Gitbook Breached

164•punchmesan•3d ago•45 comments

A new protocol and software suite for AIs

2•homingpigeon•12h ago•0 comments

Tell HN: Don't use Postman, they proxy your info without your permission

109•neya•3d ago•7 comments

Looking for a CTO

3•alpbahadur•14h ago•6 comments

I tried to connect every GPU on the planet together (kinda)

4•lukefrisker•15h ago•2 comments

Ask HN: How are companies hiring developers nowadays?

3•Frazzlebilt•17h ago•2 comments

Ask HN: AI isn't intelligent :/ what is intelligence?

5•aaditsingal7859•17h ago•7 comments

OpenClaw SaaS?

2•alexfthom•17h ago•9 comments

Ask HN: How to resist endless app directories listing your product?

2•gosen•17h ago•0 comments

Verifying a satellite image with temporal evidence

2•avijeetsingh16•18h ago•1 comments

Executive (C-Level) Decision Making Under Uncertainty with Large Language Models

2•northlondoner•18h ago•0 comments

Ask HN: Is anyone running multi/always-on agents that don't cost a fortune?

5•abejora•19h ago•3 comments

Ask HN: How's your home-cooked software revolution going?

3•nihakue•19h ago•3 comments

Ask HN: What is the most secure OS for mobile phone?

5•Muralnick•21h ago•2 comments

Ask HN: How can I get informed in the static vs. dynamic typing debate?

2•zingar•21h ago•4 comments

Ask HN: Engineers Focus Using AI

3•elchuzade•21h ago•2 comments

Ask HN: Has anyone used LLMs to audit TrueCrypt for backdoors?

5•dlphii•21h ago•1 comments

Ask HN: Does anyone have a contact with Cleveland-area Ham club?

166•stockresearcher•4d ago•23 comments

WorkOS reports security breach

81•werrett•4d ago•11 comments