Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,14 @@ embeddings2 = model.encode(sentences2, convert_to_tensor=True)
|
|
21 |
#Compute cosine-similarities
|
22 |
cosine_scores = util.cos_sim(embeddings1, embeddings2)
|
23 |
|
|
|
|
|
|
|
|
|
24 |
#Output the pairs with their score
|
25 |
for i in range(len(sentences1)):
|
26 |
-
st.text("{} \t\t {} \t\t Score: {:.4f}".format(sentences1[i], sentences2[i], cosine_scores[i][i]))
|
|
|
|
|
|
|
27 |
|
|
|
21 |
#Compute cosine-similarities
|
22 |
cosine_scores = util.cos_sim(embeddings1, embeddings2)
|
23 |
|
24 |
+
(col1, col2, score_col)= st.columns(3)
|
25 |
+
col1.header("first sentence")
|
26 |
+
col2.header("second sentence")
|
27 |
+
score_col.header("score")
|
28 |
#Output the pairs with their score
|
29 |
for i in range(len(sentences1)):
|
30 |
+
#st.text("{} \t\t {} \t\t Score: {:.4f}".format(sentences1[i], sentences2[i], cosine_scores[i][i]))
|
31 |
+
col1.write(sentences1[i])
|
32 |
+
col2.write(sentences2[i])
|
33 |
+
score_col.write(cosine_scores[i][i])
|
34 |
|