Update main.py
Browse files
main.py
CHANGED
@@ -6,7 +6,6 @@ model = SentenceTransformer(f'sentence-transformers/clip-ViT-L-14')
|
|
6 |
embeddings = model.encode(dataset['train']['image'])
|
7 |
|
8 |
def predict(im1, im2):
|
9 |
-
# ANSWER HERE
|
10 |
embeddings = model.encode([im1, im2])
|
11 |
sim = cosine_similarity(embeddings[0].reshape(1, -1), embeddings[1].reshape(1, -1))[0][0]
|
12 |
if sim > 0.89:
|
|
|
6 |
embeddings = model.encode(dataset['train']['image'])
|
7 |
|
8 |
def predict(im1, im2):
|
|
|
9 |
embeddings = model.encode([im1, im2])
|
10 |
sim = cosine_similarity(embeddings[0].reshape(1, -1), embeddings[1].reshape(1, -1))[0][0]
|
11 |
if sim > 0.89:
|