Skip to content

Services

The Flow environment is built on a modular microservice architecture. Each service is a FastAPI application covering one part of the HTR/ATR pipeline, orchestrated by the n8n environment described in this documentation. They are all in beta-status.

service-trocr-preprocess

GitHub Docs API Reference

Prepares TrOCR training or inference material from PageXML and image exports. This is the service behind the preprocessing tutorials, turning raw exports into raw_xml or line datasets on the HuggingFace Hub. Built with FastAPI, Celery, and Redis; see Installation for how to run it. Publishes interactive API docs at /docs when running in development mode.

service-trocr-inference

GitHub Docs API Reference

Runs inference with a trained TrOCR model, evaluates its output against ground truth, and merges recognized text back into the original PageXML. This is the service behind the inference, evaluation, and write raw XML tutorials. Built with FastAPI, Celery, and Redis; see Installation for how to run it. Publishes interactive API docs at /docs when running in development mode.

Training happens outside this environment

Neither service trains models. To train a TrOCR model on a line dataset produced here, use the separate TrOCR training scripts. See the FAQ for more.