Plugin ocr_translate_ollama
This is a plugin for ocr_translate that implements translations through ollama using Large Language Models (LLM)s.
Usage
For versions of the server >=0.2
- Install this by running
pip install ocr_translate_ollama - Add
ocr_translate_ollamato yourINSTALLED_APPSinsettings.py - Run the server with
AUTOCREATE_VALIDATED_MODELSonce
For versions of the server >=0.6
- Install through the server plugin manager
For versions of the server >=0.7
- Install through the server plugin manager OR manually by running
pip install ocr_translate-google
Ollama name prefixes
To avoid cluttering the ollama server (or having to set a dedicated one), the plugin will create new models from the original one (with a dedicated system prompt) adding the prefix oct_ollama_ to the model names.
This behavior can be changed by setting the environment variable OCT_OLLAMA_PREFIX to a different value.
NOTE: The final _ is added by the plugin, so it should not be included in the prefix.
IMPORTANT
Ollama needs to be installed separately and reachable from the server (check the link for instructions).
The environment variable OCT_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_MODELSOLLAMA_NUM_PARALLEL
when running the server.
For more information, check the ollama FAQ
Metadata
Release files for ocr_translate_ollama 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ocr_translate_ollama-0.3.0.tar.gz | 22.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ocr_translate_ollama-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.9 kB
Release files / ocr_translate_ollama-0.3.0.tar.gz
| Download URL | ocr_translate_ollama-0.3.0.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96461b8bb3ce95b03819ad4352bb3ab25ef97b625efe691e3d2c873a4ea36789
|
|
BLAKE2b-256 checksum How to use checksums |
991e88ae02e5291ac1f4cba5b37c9304f4d58bed78ad644518406699e3ad7749
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Release files / ocr_translate_ollama-0.3.0-py3-none-any.whl
| Download URL | ocr_translate_ollama-0.3.0-py3-none-any.whl |
|---|---|
| Size | 20.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
248bc799caaaa9617f31ea54dbb0f03d67978f5fa55e082628d662016a091f2e
|
|
BLAKE2b-256 checksum How to use checksums |
dd2c4f938631c57be7b8f922439da4446abeb97b68870132f62f8fe9a04912d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|