Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

llama-ocr

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

llama-ocr

Image to markdown (OCR) with Llama 3.2 Vision.

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
559
Maintainers
1
Weekly downloads
 
Created
Source

Llama OCR

An npm library to run OCR for free with Llama 3.2 Vision.

Current version


Installation

npm i llama-ocr

Usage

import { ocr } from "llama-ocr";

const markdown = await ocr({
  filePath: "./trader-joes-receipt.jpg", // path to your image (soon PDF!)
  model: "Llama-3.2-90B-Vision", // optional, defaults to "free"
  apiKey: process.env.TOGETHER_API_KEY, // Together AI API key
});

How it works

This library uses the free Llama 3.2 endpoint from Together AI to parse images and return markdown. Paid endpoints for Llama 3.2 11B and Llama 3.2 90B are also available for faster performance and higher rate limits.

Roadmap

  • Add support for local images OCR
  • Add support for remote images OCR
  • Add support for PDF OCR (take screenshots of PDF & feed to vision model)
  • Add support for JSON output in addition to markdown

Credit

This project was inspired by Zerox. Go check them out!

Keywords

FAQs

Package last updated on 12 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc