Skip to content

Commit

Permalink
Merge pull request Byaidu#169 from YadominJinta/main
Browse files Browse the repository at this point in the history
reduce load model time
  • Loading branch information
Byaidu authored Dec 4, 2024
2 parents 5227d53 + c7f3fd3 commit 94b5507
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf2zh/doclayout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94b5507

Please sign in to comment.