flow_inference.inference

Run the end-to-end TrOCR inference workflow for Hugging Face datasets.

This module downloads line-level OCR/HTR datasets, filters records for inference, runs TrOCR prediction on image lines, writes predictions to timestamped inference_* columns, and optionally uploads the updated dataset to the Hugging Face Hub.

Classes

Inference(download_repo_name, hf_token[, ...])

Coordinate dataset loading, TrOCR inference, result writeback, and upload.