Skip to content

Commit

Permalink
[FIX]Fix a NameError for llama-index-embeddings-clip (#10974)
Browse files Browse the repository at this point in the history
  • Loading branch information
humpydonkey authored Feb 19, 2024
1 parent 069f2c1 commit e100055
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ async def _aget_image_embedding(self, img_file_path: ImageType) -> Embedding:
return self._get_image_embedding(img_file_path)

def _get_image_embedding(self, img_file_path: ImageType) -> Embedding:
import torch

with torch.no_grad():
image = (
self._preprocess(Image.open(img_file_path))
Expand Down

0 comments on commit e100055

Please sign in to comment.