refactor: solidify startup UX and engine-aware preprocessing
- Slim core deps: move ML stack to optional extras (paddle/tables/figures/scientific/full) - Lazy settings proxy with config search paths (env var, cwd, user dir) - New commands: init, demo, setup [basic|full], first-run guard on run/watch - Engine-aware preprocessing: Paddle gets original image (fixes dark mode 0.83->0.95) - Results table shows Skipped count; lazy run-dir creation - kg_ocr marked experimental with extra, Docker defaults with OCR_PIPELINE_CONFIG - 25/25 tests, ruff clean
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
from .ocr import get_screenshots, extract_text
|
||||
from .embeddings import create_and_index
|
||||
from .rag import retrieve, ask_wllm
|
||||
"""Experimental txtai/litellm RAG interface built on the OCR pipeline.
|
||||
|
||||
This package is a prototype. The supported interface is the `ocr-pipeline` CLI
|
||||
(src/ocr_pipeline). Extra dependencies are required: `uv sync --extra kg`.
|
||||
"""
|
||||
|
||||
try:
|
||||
from .ocr import get_screenshots, extract_text
|
||||
from .embeddings import create_and_index
|
||||
from .rag import retrieve, ask_wllm
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"kg_ocr is experimental and needs extra dependencies: "
|
||||
"uv sync --extra kg (or: uv pip install txtai litellm python-dotenv)"
|
||||
) from exc
|
||||
|
||||
__all__ = ["get_screenshots", "extract_text", "create_and_index", "retrieve", "ask_wllm"]
|
||||
|
||||
Reference in New Issue
Block a user