feat(analysis): add ocrs OCR backend and OCR-driven page text search
Adds an in-process ocrs OCR backend as the active analysis engine (vision left dormant), enables OCR text search on the page-tag aggregation endpoints, and reshapes the admin analysis/settings UI to present the OCR-only surface. Bumps version 0.89.0 -> 0.90.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
31
.env.example
31
.env.example
@@ -62,11 +62,16 @@ CORS_ALLOWED_ORIGINS=
|
||||
# neither Origin nor Referer (curl, server-to-server callers) are
|
||||
# always allowed.
|
||||
#
|
||||
# Default is empty: CSRF check disabled (operator opt-out). For a
|
||||
# browser-exposed deployment this should be set to the SvelteKit
|
||||
# origin, e.g. https://app.example.com. For a same-origin
|
||||
# docker-compose deploy where only one origin exists, set the same
|
||||
# value the browser uses.
|
||||
# Empty does NOT mean "off" for browsers: cookie-authenticated admin
|
||||
# mutations FAIL CLOSED (403) when this is empty, since there's no
|
||||
# allowlist to check the Origin against. Non-cookie callers (curl,
|
||||
# bots with a Bearer token, no Origin/Referer) are still allowed.
|
||||
# So set this to the SvelteKit origin for any browser-exposed deploy,
|
||||
# e.g. https://app.example.com. For a same-origin docker-compose deploy
|
||||
# set the same value the browser uses.
|
||||
# Local dev (native `npm run dev`): the Vite origin is
|
||||
# http://localhost:5173 — set ADMIN_ALLOWED_ORIGINS=http://localhost:5173
|
||||
# or admin toggles (e.g. enabling the analysis worker) return 403.
|
||||
ADMIN_ALLOWED_ORIGINS=
|
||||
|
||||
# ----- Admin bootstrap -----
|
||||
@@ -277,6 +282,22 @@ CRAWLER_TZ=UTC
|
||||
# ANALYSIS_ENABLED Turn the worker on at first boot. Toggleable live in
|
||||
# the dashboard. Default `false`.
|
||||
ANALYSIS_ENABLED=false
|
||||
# ANALYSIS_BACKEND Which engine the worker runs. env-ONLY (deploy-time).
|
||||
# `ocr` (default) = the in-process ocrs engine: fast,
|
||||
# CPU-only, text-only, ideal for a Pi.
|
||||
# NOTE: the `vision` backend (local LLM at ANALYSIS_VISION_URL,
|
||||
# full OCR + tags + scene + safety) is TEMPORARILY DISABLED —
|
||||
# its code is kept intact but the worker forces OCR regardless,
|
||||
# logging a warning if `vision` is requested. So setting
|
||||
# `vision` here currently has no effect; the ANALYSIS_VISION_* /
|
||||
# ANALYSIS_API_KEY knobs below are dormant until it's re-enabled.
|
||||
ANALYSIS_BACKEND=ocr
|
||||
# OCRS_DETECTION_MODEL / OCRS_RECOGNITION_MODEL Paths to the ocrs `.rten`
|
||||
# text-detection / -recognition models (only read when ANALYSIS_BACKEND=ocr).
|
||||
# The backend image bakes both into /models, so the defaults work unchanged;
|
||||
# override only to point at custom-trained models.
|
||||
OCRS_DETECTION_MODEL=/models/text-detection.rten
|
||||
OCRS_RECOGNITION_MODEL=/models/text-recognition.rten
|
||||
# ANALYSIS_VISION_URL /v1/chat/completions endpoint. Required when enabled.
|
||||
# For the bundled vision container, use
|
||||
# http://mangalord-vision:8000/v1/chat/completions.
|
||||
|
||||
Reference in New Issue
Block a user