Skip to content

Commit

Permalink
Fixed issue #12
Browse files Browse the repository at this point in the history
  • Loading branch information
SWHL committed Dec 10, 2023
1 parent 7125a88 commit 8c79eca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ $ rapid_latex_ocr tests/test_files/6.png
```

### Changlog
2023-12-10 v0.0.6 update:
- Fixed issue #12

2023-12-07 v0.0.5 update:
- Add the relevant code to automatically download the model when installing the package

Expand Down
5 changes: 3 additions & 2 deletions rapid_latex_ocr/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ def get_model_path(
self,
) -> Tuple[str]:
def try_download(file_name):
if downloader(file_name):
return default_model_dir / file_name
save_path = default_model_dir / file_name
if save_path.exists() or downloader(file_name):
return save_path
raise FileNotFoundError(f"{file_name} must not be None.")

downloader = DownloadModel()
Expand Down

0 comments on commit 8c79eca

Please sign in to comment.