{% extends "base.html" %} {% from "_icons.html" import icon %} {% block title %}Providers{% endblock %} {% block content %}

Providers & setup

Credentials come from environment variables (or a .env file next to where you run pyocr serve). They never leave the server; restart it after changing them.

{{ icon('cpu') }}Tesseract OCR

{{ icon('check' if tesseract else 'alert') }}{{ 'installed' if tesseract else 'not installed' }}
{% if tesseract %}

{{ tesseract_version }} at {{ tesseract }}. Using language {{ settings.tesseract_language }} at {{ settings.ocr_dpi }} DPI. Installed languages: {% for l in tesseract_langs %}{{ l }} {% endfor %}

Set TESSERACT_LANGUAGE=eng+deu (for example) to OCR multi-language documents.

{% else %}

Install it to enable the OCR tab:

sudo apt-get install tesseract-ocr tesseract-ocr-eng   # Debian / Ubuntu
brew install tesseract                                  # macOS
choco install tesseract                                 # Windows (or the UB Mannheim installer)

Or run the Docker image, which already includes it.

{% endif %}

{{ icon('sparkles') }}LLM providers

{{ icon('grid') }}Browse & search models

Set credentials here or in environment variables / .env. Values saved here are stored on this machine in {{ credentials_path }} (owner-only), override the environment, and take effect immediately. Keys are never sent back to the browser.

{% for p in providers %} {% set st = cred_status[p.id] %}

{{ p.label }}

{{ icon('check' if p.configured else 'alert') }}{{ 'ready' if p.configured else 'not configured' }}
{% for e in st %} {% endfor %}
{{ e.name }}{% if e.required %} required{% endif %} {% if e.state == 'set' %}{{ icon('check') }}set{% if e.saved %} saved here{% endif %}{% elif e.state == 'default' %}default: {{ e.default }}{% else %}{{ 'missing' if e.required else '–' }}{% endif %} {{ e.description }}
{{ 'Edit settings' if p.configured else 'Set up in the browser' }}
{% for e in st if e.editable %}
{% if e.secret %} {% else %} {% endif %} {% if e.saved %}{% endif %}
{% endfor %}
Blank fields keep their current value.
{% for m in p.describe().model_options %}
Models {{ icon('external') }} {% if p.docs_url %}Get credentials {{ icon('external') }}{% endif %}
{% endfor %}

{{ icon('settings') }}Rendering settings in effect

DATA_DIR{{ settings.data_dir }}where uploads and results are stored
PREVIEW_DPI{{ settings.preview_dpi }}page images in the browser
LLM_DPI / LLM_MAX_EDGE_PX{{ settings.llm_dpi }} / {{ settings.llm_max_edge_px }}image sent to the LLM
OCR_DPI{{ settings.ocr_dpi }}image given to Tesseract
LLM_CONCURRENCY{{ settings.llm_concurrency }}parallel LLM calls
MAX_UPLOAD_MB{{ settings.max_upload_mb }}upload limit

A ready-to-edit template of every setting is in .env.example; run pyocr init to copy it into the current directory.

{% endblock %} {% block scripts %}{% endblock %}