Update main.py
Browse files
main.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
import matplotlib.pyplot as plt
|
2 |
-
|
3 |
import gradio as gr
|
|
|
|
|
|
|
|
|
4 |
|
5 |
def predict(im1, im2):
|
6 |
# ANSWER HERE
|
|
|
1 |
import matplotlib.pyplot as plt
|
|
|
2 |
import gradio as gr
|
3 |
+
from sklearn.metrics.pairwise import cosine_similarity
|
4 |
+
|
5 |
+
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
|