From 26a141738c56b544c8631078bb291a3d6e7ce7d6 Mon Sep 17 00:00:00 2001 From: Juan Coria Date: Mon, 30 Oct 2023 15:42:14 +0100 Subject: [PATCH] Change embedding model return type to Callable Co-authored-by: Simon <80467011+sorgfresser@users.noreply.github.com> --- src/diart/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diart/models.py b/src/diart/models.py index 7df9ac09..fec892d4 100644 --- a/src/diart/models.py +++ b/src/diart/models.py @@ -28,7 +28,7 @@ def __init__(self, model_info, hf_token: Union[Text, bool, None] = True): self.model_info = model_info self.hf_token = hf_token - def __call__(self) -> Union[Model, PretrainedSpeakerEmbedding]: + def __call__(self) -> Callable: try: return Model.from_pretrained(self.model_info, use_auth_token=self.hf_token) except HTTPError: