From 9d6a2e8f3fe6866ac968125469828cd14a98dbcb Mon Sep 17 00:00:00 2001 From: YadominJinta Date: Wed, 4 Dec 2024 22:23:01 +0800 Subject: [PATCH] reduce load model time --- pdf2zh/doclayout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf2zh/doclayout.py b/pdf2zh/doclayout.py index 4ea250c3..c00f5e0e 100644 --- a/pdf2zh/doclayout.py +++ b/pdf2zh/doclayout.py @@ -70,7 +70,7 @@ def __init__(self, model_path: str): @staticmethod def from_pretrained(repo_id: str, filename: str): - pth = hf_hub_download(repo_id=repo_id, filename=filename) + pth = hf_hub_download(repo_id=repo_id, filename=filename, etag_timeout=1) return OnnxModel(pth) @property