Use cache_dir instead of local_dir (#182)

* Use cache_dir instead of local_dir

* Fix unit test

* Use cache_dir and preserve local_dir parameter

* Remove blank line at the end

* Disable ut

* Implement  download_root suggestion

* Use cache_dir=download_root
This commit is contained in:
Jordi Mas
2023-04-26 16:35:18 +02:00
committed by GitHub
parent 67cce3f552
commit 68df3214ba
3 changed files with 14 additions and 1 deletions

View File

@@ -112,7 +112,9 @@ class WhisperModel:
model_path = model_size_or_path
else:
model_path = download_model(
model_size_or_path, download_root, local_files_only
model_size_or_path,
local_files_only=local_files_only,
cache_dir=download_root,
)
self.model = ctranslate2.models.Whisper(