Spaces:
Sleeping
Sleeping
import pickle | |
from torchvision import transforms | |
from PIL import Image | |
import torch | |
import io | |
from ImageAndTextEmbedding.index import getImageEmbedding | |
def get_image_embedding(image_bytes): | |
print("comming 1") | |
return getImageEmbedding(image_bytes) | |
# Example: Load image data from file and get its embedding | |
# image_data = open("pictures/users/2.jpg", "rb").read() | |
# embedding = get_image_embedding(image_data) | |
# print(embedding) | |
print("Image embedding model loaded successfully!") |