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: How would you go about domain change and getting a job in the domain?

2•joddystreet•3h ago•4 comments

Ask HN: What's your favorite children's books?

20•lgregg•14h ago•31 comments

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

764•lukehandcool•2d ago•244 comments

Ask HN: What do you run on a $5 VPS that's worth keeping online 24/7?

411•mariocesar•4d ago•646 comments

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

569•IvanK_net•4d ago•343 comments

Ask HN: Fake abuse reports keep auto-blocking my site on Cloudflare

6•Kamabz•16h ago•0 comments

Chatcasting, an Alternative to Podcasting

5•tsydenzhap•9h ago•2 comments

All startups need is distribution

6•relaxfolio•10h ago•3 comments

Ask HN: Resources for best practices in software development with AI?

6•sergio-gdr•11h ago•0 comments

Ask HN: Would you support a law banning filming people in public?

6•dfps•13h ago•5 comments

Ask HN: Locked out of Google despite knowing password and having email access

6•coherenttemple•15h ago•2 comments

I am so tired of startups doing worse than me

4•sankde•16h ago•11 comments

Ask HN: MS Outlook login without an extra email address

3•narevent•16h ago•4 comments

How do Lightroom/DxO achieve such good AI denoising results?

3•febed•19h ago•1 comments

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

13•consumer451•1d ago•30 comments

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

34•onemiketwelve•5d ago•18 comments

Does YC use AI agents to review your pitch?

2•AravPhi•1d ago•0 comments

Ask HN: Whats the first command you run on a new server?

8•fragmede•1d ago•20 comments

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

11•hanstyle•2d ago•18 comments

Ask HN: Are there things more important than 'humanity', such as empathy?

5•dfps•1d ago•6 comments

Ask HN: Is the Steam Machine worth $1049?

12•bigwheels•2d ago•14 comments

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

12•thelastgallon•3d ago•24 comments

Ask HN: What's your plan if AI takes your job?

4•bumicodes•17h ago•12 comments

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

8•amichail•2d ago•7 comments

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

14•scoofy•2d ago•13 comments

Ask HN: Positive text origin verification

4•Miguel_FierroM•2d ago•8 comments

Ask HN: What Is Your Personal Backup Methods

13•Crontab•4d ago•12 comments

Ask HN: Is the Future of IDEs Bleak?

6•bigmattystyles•3d ago•9 comments

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

17•saimiam•4d ago•37 comments

Tell HN: HN has lost the joy for me

41•trencedamp•4d ago•32 comments