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: What do you run on a $5 VPS that's worth keeping online 24/7?

364•mariocesar•2d ago•582 comments

Tell HN: I've been paying for a rural Tanzanian's education for 10 years

731•lukehandcool•1d ago•228 comments

Tell HN: GitHub refuses to remove cracked copies of my software after a month

567•IvanK_net•3d ago•344 comments

Ask HN: What if no AIpocalypse, no AI bubble, what if it just keeps advancing?

10•consumer451•5h ago•18 comments

Ask HN: Are you a subscribed LLM or a locally deployed open-source model?

10•hanstyle•12h ago•14 comments

Ask HN: Is the Steam Machine worth $1049?

12•bigwheels•23h ago•12 comments

Ask HN: Why hasn't AI replaced Tax filing software

11•thelastgallon•1d ago•20 comments

Ask HN: Are there AI models for generating sounds based on a text and reference?

34•onemiketwelve•3d ago•18 comments

Ask HN: Do employees vastly outnumber founders on Hacker News?

7•amichail•1d ago•6 comments

You're saving one minute and now I can't know if I'm talking a human

12•scoofy•1d ago•13 comments

Ask HN: Positive text origin verification

4•Miguel_FierroM•1d ago•7 comments

Ontological Language Model (OLM) + LLM: Deterministic AI Advancement

2•northlondoner•23h ago•1 comments

Super Intelligence and/or Artificial Intelligence

8•butlersean•1d ago•6 comments

Ask HN: What happened with quantum computers anyway?

4•pera•1d ago•3 comments

Ask HN: Is the Future of IDEs Bleak?

5•bigmattystyles•1d ago•9 comments

Tell HN: Amazon forgot how to write and test code

12•penskymaterial•1d ago•4 comments

Ask HN: What Is Your Personal Backup Methods

13•Crontab•2d ago•12 comments

Ask HN: Learning practical system design

5•rcdmrl•1d ago•0 comments

Ask HN: What games do you religiously play on your phone browser?

15•saimiam•2d ago•35 comments

Ask HN: Are we trading model capacity for compute?

2•olirex99•1d ago•0 comments

Ask HN: Which frontier model can do code security reviews

7•Bender•2d ago•9 comments

Tell HN: HN has lost the joy for me

39•trencedamp•2d ago•30 comments

Ask HN: Any Insight Here into French High School Unrest?

4•giardini•22h ago•1 comments

Ask HN: How do you describe what your relationship brings you?

7•maxignol•2d ago•11 comments

You've reached the end!