From fcafcb51bd0d31394323ff70e9c38229c7a3d8d9 Mon Sep 17 00:00:00 2001 From: mosheber Date: Mon, 28 Oct 2024 03:38:22 -0700 Subject: [PATCH] replaced list[str] with List[str] --- fastrag/generators/llava.py | 4 ++-- scripts/optimizations/embedders/embedders.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fastrag/generators/llava.py b/fastrag/generators/llava.py index d4d7b72..6070114 100644 --- a/fastrag/generators/llava.py +++ b/fastrag/generators/llava.py @@ -119,7 +119,7 @@ def __init__( def run( self, prompt: str, - images: list[str] = None, + images: List[str] = None, generation_kwargs: Optional[Dict[str, Any]] = None, ): """ @@ -368,7 +368,7 @@ def assign_inputs(self, inputs): def run( self, prompt: str, - images: list[str] = None, + images: List[str] = None, generation_kwargs: Optional[Dict[str, Any]] = None, ): """ diff --git a/scripts/optimizations/embedders/embedders.py b/scripts/optimizations/embedders/embedders.py index f9f319e..092a7c6 100644 --- a/scripts/optimizations/embedders/embedders.py +++ b/scripts/optimizations/embedders/embedders.py @@ -116,7 +116,7 @@ def _mean_pooling(outputs, attention_mask): class EmbedderModelMTEB(EmbedderModel): def encode( - self, sentences: list[str], batch_size=32, **kwargs: Any + self, sentences: List[str], batch_size=32, **kwargs: Any ) -> torch.Tensor | np.ndarray: return self.encode_sentences( sentences=sentences,