AkinyemiAra commited on
Commit
a56d89f
·
verified ·
1 Parent(s): 3ad3e19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -8,7 +8,15 @@ processor = AutoImageProcessor.from_pretrained("nomic-ai/nomic-embed-vision-v1.5
8
  vision_model = AutoModel.from_pretrained("nomic-ai/nomic-embed-vision-v1.5", trust_remote_code=True)
9
 
10
  def ImgEmbed(image):
11
- """This is useful to create embeddings for images to enhance possibilietes of image search"""
 
 
 
 
 
 
 
 
12
  print(image);
13
  inputs = processor(image, return_tensors="pt")
14
 
 
8
  vision_model = AutoModel.from_pretrained("nomic-ai/nomic-embed-vision-v1.5", trust_remote_code=True)
9
 
10
  def ImgEmbed(image):
11
+ """
12
+ Generate normalized embedding vector for the uploaded image.
13
+
14
+ Args:
15
+ image (PIL.Image.Image or np.ndarray): Input image uploaded by the user.
16
+
17
+ Returns:
18
+ list[float]: A normalized image embedding vector representing the input image.
19
+ """
20
  print(image);
21
  inputs = processor(image, return_tensors="pt")
22