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

What to do if you discover AI models trained using your copywrighted book?

4•andrea81•26m ago•3 comments

Ask HN: Do you still read clean code and software architecture books?

8•pelcg•7h ago•5 comments

Ask HN: If the models are so good, why doesn't OpenAI just start 100 companies?

678•ex-aws-dude•4d ago•751 comments

Tell HN: I unknowingly broke the PHP RCE embargo. I am sorry

751•petecooper•4d ago•269 comments

Ask HN: Is it not possible to enroll for Apple Developer anymore?

31•olalonde•1d ago•15 comments

Ask HN: How do you grow OSS projects?

4•tarasyarema•13h ago•8 comments

Ask HN: What are your career plans in the age of AI?

6•akudha•6h ago•7 comments

Ask HN: Are tab completion models dead?

22•sandruso•1d ago•17 comments

Ask HN: How fast is your CI these days?

7•easterncalculus•1d ago•5 comments

Median product "lifespan" has fallen from ~4y down to ~1.5y

86•stanislavb•3d ago•33 comments

Is AI just another get rich quick scheme?

16•jqpabc123•2d ago•27 comments

Ask HN: Mined crypto on Azure when I was 13, after 12y still cannot open account

6•realaccfromPL•1d ago•2 comments

I'm creating my own OS, check it out, LimonOs no Unix no Linux

4•Drfoxi•1d ago•4 comments

Ask HN: Are people aware OpenAI Dots intercept SSL?

7•Benjamin_Dobell•1d ago•1 comments

Ask HN: Kimi Code hit its 5-hour limit after $1.37 of API usage

6•waximabbax•2d ago•3 comments

Tell HN: Steamcmd doesn't work on Apple Silicon

6•stdc105•3d ago•6 comments

Game trips modem/router breaker

4•simpaticoder•2d ago•3 comments

Took apart Claude Code, then turned it into a free course on harness engineering

7•pauliusztin•2d ago•0 comments

Ask HN: How do people self host email and maintain deliverability?

7•smithbob•2d ago•7 comments

Ask HN: How has your company adapted interviews in the AI world?

11•parthdesai•4d ago•7 comments

GitHub now uses a generic avatar instead of "Identicons" for new profiles

12•winkelmann•4d ago•3 comments

Ask HN: What router will remain secure during the vulnpocalypse?

9•nonfunctional•3d ago•3 comments

Tell HN: Claude CLI doesn't exit anymore, not even with CTRL-C

8•cromka•3d ago•2 comments

Ask HN: Which AI Security tool do you use and why for your repositories?

5•BehanPrW•4d ago•1 comments

Ask HN: Apple rejected my dev account enrollment with no reason, what do I do?

5•Mutinix•3d ago•2 comments

Ask HN: What do you think about lightweight default games on Linux distros?

4•abakh•3d ago•0 comments

You've reached the end!