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: Where is our profession (programmer) going?

51•syntaxbush•4h ago•49 comments

Ask HN: How much coding should beginners learn in the AI era?

26•JohnDSDev•14h ago•36 comments

Ask HN: What are the hardest problems AWS Lambda MicroVMs can solve now?

4•iaziz786•6h ago•0 comments

Ask HN: What was the biggest contributor to your happiness in the past year?

3•chistev•57m ago•2 comments

Ask HN: Why don't LLM harnesses enable/expose custom middleware hooks?

8•fur-tea-laser•11h ago•5 comments

Ask HN: I miss old days of blogging without promotions

5•throwaw12•13h ago•11 comments

Ask HN: Yahoo deleted all my emails. Now what?

14•neya•1d ago•12 comments

Overfitted a 900KB Transformer to Compress a 100MB CSV into 7MB

8•spidy__•1d ago•4 comments

Ask HN: Which book taught you the most about software architecture?

3•akashwadhwani35•2h ago•0 comments

Ask HN: How are you finding work/gigs as a SWE?

10•mariopt•19h ago•7 comments

Ask HN: What home printer do you use/recommend?

17•niyazpk•1d ago•20 comments

How to find AI-conservative companies to work for?

19•tossitawayplz•1d ago•11 comments

Ask HN: Am I missing something with AI

14•vasko•1d ago•20 comments

Elastic Layoffs?

9•nunocoracao•9h ago•3 comments

Ask HN: Will programmers write more efficient code during the memory shortage?

152•amichail•5d ago•245 comments

Anyone else feels many LLMs are heavily biased towards consumerism these days?

7•pyeri•22h ago•3 comments

Ask HN: Do you have an unusual income source

50•xupybd•3d ago•37 comments

Ask HN: Anthropic banned me from using Claude Code and I don't know what to do

78•ayi•2d ago•87 comments

Ask HN: Is anyone using the A2A protocol?

96•asim•6d ago•45 comments

Ask HN: What tools are you using for AI-assisted code review?

25•agos•6d ago•29 comments

Tell HN: I never bought anything from clicking on a paid ad

22•julienreszka•2d ago•27 comments

Ask HN: Are people generally interested using LLMs for learning purposes?

7•iknownthing•1d ago•11 comments

Ask HN: Are people optimistic about the future?

42•JohnDSDev•4d ago•90 comments

What's the worst thing your AI agent did in production without asking first?

3•rockingraj•18h ago•3 comments

Ask HN: How close are we to local LLMs being useful? What's the impact?

7•AbstractH24•2d ago•7 comments

Ask HN: Are you being "529 Overloaded" by Anthropic too?

10•hmokiguess•3d ago•8 comments

Open source, global vs. proprietary but for US in US, which is fundable in SaaS?

4•avijeetsingh16•2d ago•0 comments

Ask HN: I'm lost. How can I define ICP (Ideal Customer Profile)?

8•snowhy•6d ago•6 comments

Ask HN: What is your opinion on TUI applications

9•po1nt•2d ago•12 comments

You've reached the end!