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: Do you still read clean code and software architecture books?

5•pelcg•1h ago•3 comments

Ask HN: How do you grow OSS projects?

3•tarasyarema•6h ago•4 comments

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

677•ex-aws-dude•3d ago•750 comments

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

31•olalonde•18h ago•12 comments

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

749•petecooper•4d ago•269 comments

AI is coming for accounting after coding

3•shoman3003•5h ago•2 comments

Ask HN: How fast is your CI these days?

7•easterncalculus•22h ago•5 comments

Tell HN: 2x PHP RCE CVEs with CVSS 10.0 Incoming

304•petecooper•6d ago•62 comments

Ask HN: Are tab completion models dead?

22•sandruso•1d ago•16 comments

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

5•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

Is AI just another get rich quick scheme?

16•jqpabc123•2d ago•27 comments

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

86•stanislavb•3d ago•33 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: Am I the only dev who, with the advent if AI, want to work in a forest?

16•aledevv•5d ago•24 comments

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

7•smithbob•2d ago•7 comments

Ask HN: How can you retrain in a field requiring expensive equipment?

14•masterchief166•5d ago•11 comments

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

12•winkelmann•3d ago•3 comments

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

11•parthdesai•4d ago•7 comments

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

9•nonfunctional•2d ago•3 comments

You've reached the end!