Skip to main content

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 your INSTALLED_APPS in settings.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

ocr_translate_ollama-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

ocr_translate_ollama-0.1.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

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

Hashes for ocr_translate_ollama-0.1.0.tar.gz
Algorithm Hash digest
SHA256 578fcd4d74d710140e71b6597e29f0ac1aa03ae58a464beea1a78097ea7ab3a8
MD5 bfac569bf58e89414eb6628c501fda7c
BLAKE2b-256 42ae17f94307c6f5e5a76e29df6a56aa3f03f87b3235769019ad8ab66acefeb9

See more details on using hashes here.

File details

Details for the file ocr_translate_ollama-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ocr_translate_ollama-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5799aa72287f9088404cf063060c0c61e3c1b51150f229a703c18c9d1acff28d
MD5 cd60d9b042fce7eb1bb442bc43a9d50b
BLAKE2b-256 e8e494be8b68a1673190ea208bf5d08c3ac1818bfded81fd3035b6f93b533af3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page