Spaces:
Configuration error
Configuration error
Update model.py
Browse files
model.py
CHANGED
@@ -57,10 +57,3 @@ def calculate_similarity(text1, text2):
|
|
57 |
return response.json()"""
|
58 |
|
59 |
|
60 |
-
|
61 |
-
"""def calculate_similarity(text1, text2):
|
62 |
-
model = SentenceTransformer('paraphrase-MiniLM-L6-v2')
|
63 |
-
embedding1 = model.encode(text1, convert_to_tensor=True)
|
64 |
-
embedding2 = model.encode(text2, convert_to_tensor=True)
|
65 |
-
similarity_score = util.pytorch_cos_sim(embedding1, embedding2)
|
66 |
-
return similarity_score.item()"""
|
|
|
57 |
return response.json()"""
|
58 |
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|