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.3.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

ocr_translate_ollama-0.1.3-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file ocr_translate_ollama-0.1.3.tar.gz.

File metadata

  • Download URL: ocr_translate_ollama-0.1.3.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for ocr_translate_ollama-0.1.3.tar.gz
Algorithm Hash digest
SHA256 928dc1ca53b9368509ebee8704d2be7389f617a181ac65b5350f684e2c7d16fc
MD5 5f84d1dd946dc0a13f509a6405b1715a
BLAKE2b-256 ccee8b551915fb540e3439d616993adfeef6b9d4f60d1b7927a77b12cb753c35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ocr_translate_ollama-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85a3a43fe456e8f4539ffff92ba73fc54f6159355778c16e8ac766af9b7ebd2c
MD5 c922c9194f9fddf3c4d8ba4bb735dd23
BLAKE2b-256 3163675ff1a9417194c4511ed315643121169a07c34ccdd3764efd000ef208f2

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