Plugin to implement ollama (LLMs) based translations for ocr_translate
Project description
Plugin ocr_translate_ollama
This is a plugin for ocr_translate that implements translations through ollama using Large Language Models (LLM)s.
Usage
- Install this by running
pip install ocr_translate_ollama
- Add
ocr_translate_ollama
to yourINSTALLED_APPS
insettings.py
- Run the server with
AUTOCREATE_VALIDATED_MODELS
once
IMPORTANT
Ollama needs to be installed separately and reachable from the server (check the link for instructions).
The environment variable OLLAMA_ENDPOINT
should be set to the endpoint of the ollama server (including the /api
).
Example:
export OLLAMA_ENDPOINT=http://localhost:11434/api
Depending on the RAM available on your system (CPU/GPU), you also may need to tune the variables
OLLAMA_MAX_LOADED_MODELS
OLLAMA_NUM_PARALLEL
when running the server.
For more information, check the ollama FAQ
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ocr_translate_ollama-0.1.0.tar.gz
.
File metadata
- Download URL: ocr_translate_ollama-0.1.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 578fcd4d74d710140e71b6597e29f0ac1aa03ae58a464beea1a78097ea7ab3a8 |
|
MD5 | bfac569bf58e89414eb6628c501fda7c |
|
BLAKE2b-256 | 42ae17f94307c6f5e5a76e29df6a56aa3f03f87b3235769019ad8ab66acefeb9 |
File details
Details for the file ocr_translate_ollama-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: ocr_translate_ollama-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5799aa72287f9088404cf063060c0c61e3c1b51150f229a703c18c9d1acff28d |
|
MD5 | cd60d9b042fce7eb1bb442bc43a9d50b |
|
BLAKE2b-256 | e8e494be8b68a1673190ea208bf5d08c3ac1818bfded81fd3035b6f93b533af3 |