From 64c738288091e012a18ad9d1cfa120c6b1859c75 Mon Sep 17 00:00:00 2001 From: Nikos Livathinos Date: Sun, 8 Dec 2024 18:35:06 +0100 Subject: [PATCH] fix: Silence the tqdm messages during the downloading of model files Signed-off-by: Nikos Livathinos --- docling/pipeline/standard_pdf_pipeline.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docling/pipeline/standard_pdf_pipeline.py b/docling/pipeline/standard_pdf_pipeline.py index 40105a38..f733ced9 100644 --- a/docling/pipeline/standard_pdf_pipeline.py +++ b/docling/pipeline/standard_pdf_pipeline.py @@ -98,6 +98,11 @@ class StandardPdfPipeline(PaginatedPipeline): ) -> Path: from huggingface_hub import snapshot_download + # Disable tqdm prints used by HF + from tqdm import tqdm + from functools import partialmethod + tqdm.__init__ = partialmethod(tqdm.__init__, disable=True) + download_path = snapshot_download( repo_id="ds4sd/docling-models", force_download=force,