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: Which one do you use for planning and coding between sonnet and Opus?

3•neverenderr•5h ago•3 comments

Tell HN: Airbnb updated "necessary" cookies aren't

5•janalsncm•9h ago•0 comments

Is Cloudflare classifying opencode.ai as malware?

3•_raz•6h ago•4 comments

Ask HN: Mass Loss in Black Hole Merger? How Does That Work?

4•AnimalMuppet•2h ago•1 comments

SFR (French Internet provider) is blocking opencode.ai

5•krikou•7h ago•4 comments

Ask HN: Should authors disclose if they are paid to write a blog post?

2•wseqyrku•9h ago•2 comments

Robotics development made dead simple (open source)

22•Ekami•3d ago•7 comments

YC startup offers interviews to people who get their name permanently tattooed

13•codexon•18h ago•9 comments

Ask HN: Is everybody's Claude weekly quota reset time the same?

6•0gs•16h ago•6 comments

Belkin killed my smart switch. I got it working again without their app

13•gaborme•23h ago•1 comments

Do newer coding models end up training on the AI slop generated by older models?

7•tbharath•13h ago•9 comments

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

4•Bender•18h ago•0 comments

Ask HN: Is Reddit trying to kill old Reddit?

12•lostaccount•11h ago•10 comments

For the cheap price of a permanent tatto, get access to job interview

16•NoRagrets•14h ago•15 comments

Ask HN: How are you handling production risks from AI generated code?

4•varda_62892•5h ago•5 comments

Ask HN: Anyone else tired of brands discontinuing your favorite everyday items?

48•GreenPencil7•1d ago•46 comments

Ask HN: Crooked Timber showed showed me a virus captcha, What now?

43•Jgoauh•2d ago•47 comments

How to get more coding productivity with LLMs

6•DaveParkCity•15h ago•1 comments

Ask HN: What do you use for privacy focused analytics?

3•garyhbutton•17h ago•7 comments

Ask HN: Stop Looking at Code?

3•grandimam•17h ago•9 comments

Ask HN: Looking for testers for my RAM-based Linux distribution

3•sumtas•18h ago•0 comments

Senior Dev Imposter Syndrome

5•daltonlcarr•18h ago•5 comments

Transfer context from one agent to another agent mid task

3•iamalizaidi•18h ago•0 comments

Tell HN: Our paid Claude AI subscription unavailable >1 week and no support

45•KellyCriterion•2d ago•22 comments

The World Is to Focused on Quarterly Earnings

4•Taikhoom2010•13h ago•2 comments

You've reached the end!