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: GitHub employees what's going on? Why?

305•sharts•2d ago•252 comments

Ask HN: Has anyone shipped a self-modifying application with LLMs?

4•ex-aws-dude•3h ago•5 comments

Ask HN: I've quit six systems for tracking my illness. What works?

48•Abh1Works•4d ago•54 comments

Ask HN: Alternatives to GitHub

635•dhruv3006•2d ago•425 comments

AWS new AZ in eu-west-2 - beware of unexpected results

5•eddie_catflap•6h ago•2 comments

Tell HN: Cloudflare silently injects its analytics when you switch nameservers

650•stagas•3d ago•202 comments

Ask HN: What's the endgame of the AI comments buried in every post?

6•elar_verole•7h ago•9 comments

Ask HN: How do you access archive.today?

3•crazybonkersai•11h ago•2 comments

ServiceNow are pushing customers off SaaS – are other industries doing similar?

9•rorychatt•21h ago•4 comments

New OllamaMQ v0.3.0

5•chleba•22h ago•0 comments

Ask HN: What are independent software contractors doing now?

10•Madmallard•15h ago•4 comments

Why Don't We Version UIs?

8•gruensk•1d ago•10 comments

Ask HN: How should I price an AI infrastructure platform?

2•aqibkhan026•23h ago•2 comments

Ask HN: Good IMAP Email Clients?

5•pudgywalsh•23h ago•6 comments

Ask HN: Good content on using AI to modernize professional services delivery

5•mguerville•1d ago•3 comments

Combinatorics-Framework released for QA testers/students

2•yb-combi•1d ago•0 comments

Ask HN: Countries with greatest temperature increases have benefited from them?

6•amichail•1d ago•4 comments

Ask HN: How do you keep up with HN these days?

92•simonebrunozzi•4d ago•148 comments

Ask HN: Do you feel comfortable admitting that you use AI?

12•var0xyz•1d ago•30 comments

Ask HN: Another GitHub Outage?

3•tom1337•1d ago•1 comments

I made a secure way for agents to request secrets from you using HyperDHT

2•smashah•1d ago•0 comments

Ask HN: Science Fiction. Some AI as world leader. Would you vote it?

3•ewjloop•1d ago•10 comments

Ask HN: Can I realistically make an app as a junior dev?

4•brooke1•1d ago•16 comments

Is there room for an AI-powered webmail service built on a single-letter domain?

4•pbt93•1d ago•6 comments

You've reached the end!