OCR using LLAMA vision model, allowing configuring any OpenAI compliant endpoints and model names.
Project description
Using LLAMA Vision Model for OCR, allowing configuring any OpenAI compliant endpoints and model names. This is the python version of llama-ocr.
Free software: MIT license
Installation
pip install llama-ocr
Usage
from llama_ocr import ocr
data = ocr(
file_path="./test.png",
api_key="xxxxx",
base_url="https://openrouter.ai/api",
model="meta-llama/llama-3.2-11b-vision-instruct:free"
)
# file_path: Path to the image file
# api_key: Your LLM API key
# base_url: The base URL of the LLM API
# model: The model to use
By default, this project will use the free model from OpenRouter. So you just need to provide your API key and image path.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
llama_ocr-0.2.0.tar.gz
(10.7 kB
view details)
Built Distribution
File details
Details for the file llama_ocr-0.2.0.tar.gz
.
File metadata
- Download URL: llama_ocr-0.2.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e76f14bfa41f4fd63567ece0d51c8f4361ed60e9eef86fd71f339118ef7edb41 |
|
MD5 | 2fa19b76dcb2a0ef476c052dd579821a |
|
BLAKE2b-256 | 8afa405e24e1dd75e0766e39f01ef8225a00838aaafa9276bedd681751f62583 |
File details
Details for the file llama_ocr-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_ocr-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db14d169646bd6e9c13b83a88ee674b3a8f0e09aad118c25fec76b91492ec63c |
|
MD5 | 2c4f1b8651c4ca92bf842edfc1d782ae |
|
BLAKE2b-256 | 6a01e15906afa7a89550dc4937078ab5501831d70a4c590e3a3e9e20d2fc3bac |