ImageProcessing's picture
Upload 5 files
e2fdd3f
raw
history blame contribute delete
506 Bytes
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!")