Skip to content

Commit

Permalink
Fixed method misspelling
Browse files Browse the repository at this point in the history
  • Loading branch information
I8dNLo committed Dec 20, 2024
1 parent ade31c5 commit 5cc0a7e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions fastembed/late_interaction_multimodal/colpali.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ def _post_process_onnx_image_output(
Returns:
Iterable[np.ndarray]: Post-processed output as NumPy arrays.
"""
return output.model_output.reshape(output.model_output.shape[0], -1, self.model_description['dim']).astype(np.float32)
return output.model_output.reshape(
output.model_output.shape[0], -1, self.model_description["dim"]
).astype(np.float32)

def _post_process_onnx_text_output(
self,
Expand Down Expand Up @@ -172,7 +174,10 @@ def _preprocess_onnx_text_input(
self, onnx_input: dict[str, np.ndarray], **kwargs
) -> dict[str, np.ndarray]:
onnx_input["input_ids"] = np.array(
[self.QUERY_MARKER_TOKEN_ID + input_ids[2:].tolist() for input_ids in onnx_input["input_ids"]]
[
self.QUERY_MARKER_TOKEN_ID + input_ids[2:].tolist()
for input_ids in onnx_input["input_ids"]
]
)
empty_image_placeholder = np.zeros(self.IMAGE_PLACEHOLDER_SIZE, dtype=np.float32)
onnx_input["pixel_values"] = np.array(
Expand Down Expand Up @@ -232,7 +237,7 @@ def embed_text(
**kwargs,
)

def embed_images(
def embed_image(
self,
images: ImageInput,
batch_size: int = 16,
Expand Down

0 comments on commit 5cc0a7e

Please sign in to comment.