From d3e4c2dc750f1f03fbcef70f906f0789ef6f032c Mon Sep 17 00:00:00 2001 From: Jaikinator Date: Fri, 1 Sep 2023 14:09:57 +0200 Subject: [PATCH] changed cache default to true --- autotranscript/diarisation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autotranscript/diarisation.py b/autotranscript/diarisation.py index 44964e0..682c145 100644 --- a/autotranscript/diarisation.py +++ b/autotranscript/diarisation.py @@ -152,7 +152,7 @@ class Diariser: Returns: str: The Huggingface token. """ - + if os.path.exists(TOKEN_PATH): with open(TOKEN_PATH, 'r', encoding="utf-8") as file: token = file.read() @@ -178,7 +178,7 @@ class Diariser: def load_model(cls, model: str = PYANNOTE_DEFAULT_CONFIG, use_auth_token: str = None, - cache_token: bool = False, + cache_token: bool = True, cache_dir: Union[Path, str] = PYANNOTE_DEFAULT_PATH, hparams_file: Union[str, Path] = None, *args, **kwargs @@ -208,7 +208,7 @@ class Diariser: if not os.path.exists(model) and use_auth_token is None: use_auth_token = cls._get_token() model = 'pyannote/speaker-diarization' - + _model = Pipeline.from_pretrained(model, use_auth_token = use_auth_token, cache_dir = cache_dir,