fix: Silence the tqdm messages during the downloading of model files

Signed-off-by: Nikos Livathinos <nli@zurich.ibm.com>
This commit is contained in:
Nikos Livathinos 2024-12-08 18:35:06 +01:00
parent e125b9b24d
commit 64c7382880

View File

@ -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,