Spaces:
Running
Running
Update app.py
Browse files
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 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|