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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ocr_translate_ollama-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6ef8e5732850e3dbf1f0e174a6baad764e49ce909da1866fa4dc7dafb7e0f74b
MD5 24898147adfdb724746a54709cf4096d
BLAKE2b-256 b9e639487469eed95ed4b8890c32e020ac498fd57a3e3546c30342e4a8f4fd7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ocr_translate_ollama-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad988e7658f058daeaa56b35c907161ae986d74902a816ade7618c339016e86b
MD5 b84259d6c8c08d9640eb90f4d0bcd87a
BLAKE2b-256 cb9da54c300080fe5d9bf21ba0f6c48d50803ea52c746153b58a9d7eb3fdd028

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