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

My Thoughts on AI and LLMs

8•leonardovb•5h ago•13 comments

Ask HN: How to recover Google auth after phone stolen?

109•keymasta•1d ago•118 comments

ESP32 p4 pico and IMX477 camera

3•time-q•5h ago•0 comments

Ask HN: What happens when Claude Code goes away?

2•HoldOnAMinute•6h ago•15 comments

Ask HN: Have you stopped underestimating AI yet?

3•amichail•7h ago•6 comments

Does this mean it's fine to use Claude subscriptions with third party harnesses?

2•jakemanger•9h ago•1 comments

Neovim have a ~$800k Bitcoin donation sitting untouched since 2023

309•jakemanger•1d ago•264 comments

Ask HN: Help choosing between AWS ECS and EKS

5•pigradish•11h ago•9 comments

Ask HN: Co-Founder(s). Do I need any? How would I even find them?

10•bhollan•1d ago•11 comments

Ask HN: Alternatives to Twitter/X?

5•throwaway2027•10h ago•5 comments

Open-sourced jev architecture last year with model,paper and dataset

46•nandakishor_ml•1d ago•11 comments

Ask HN: What self-hosted apps do you use daily?

5•osr00•1d ago•13 comments

Ask HN: What is the most career altering course or book you have gone through?

16•learner_yearner•2d ago•21 comments

Ask HN: What Makes Tokens Expensive?

3•mtokarski•1d ago•6 comments

Claude Desktop Silently Associates with Common Files

3•3371•1d ago•0 comments

Can I get insurance for company renting humanoids for parties?

4•cpsk•1d ago•15 comments

Ask HN: How are you managing aging relatives passwords?

13•rylando•4d ago•17 comments

Ask HN: Why have we normalized jobs and soft skills bullshit so much?

5•thomasjeff1•17h ago•7 comments

Ask HN: Lesser known features of macOS/iPadOS/iOS/etc. 27

15•lucasoshiro•3d ago•8 comments

You've reached the end!