mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-15 07:35:27 +03:00
use cache paths
This commit is contained in:
parent
c87bdb4d26
commit
170860b083
@ -119,14 +119,16 @@ class GenericONNXEmbedding:
|
||||
def _load_tokenizer(self):
|
||||
tokenizer_path = os.path.join(f"{MODEL_CACHE_DIR}/{self.model_name}/tokenizer")
|
||||
return AutoTokenizer.from_pretrained(
|
||||
tokenizer_path, clean_up_tokenization_spaces=True
|
||||
self.model_name, cache_dir=tokenizer_path, clean_up_tokenization_spaces=True
|
||||
)
|
||||
|
||||
def _load_feature_extractor(self):
|
||||
feature_extractor_path = os.path.join(
|
||||
f"{MODEL_CACHE_DIR}/{self.model_name}/feature_extractor"
|
||||
)
|
||||
return AutoFeatureExtractor.from_pretrained(feature_extractor_path)
|
||||
return AutoFeatureExtractor.from_pretrained(
|
||||
self.model_name, cache_dir=feature_extractor_path
|
||||
)
|
||||
|
||||
def _load_model(self, path: str, providers: List[str]):
|
||||
if os.path.exists(path):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user