Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,7 @@
|
|
|
|
|
|
|
|
|
|
1 |
from sentence_transformers import SentenceTransformer, util
|
2 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|
3 |
|
@@ -19,4 +23,5 @@ cosine_scores = util.cos_sim(embeddings1, embeddings2)
|
|
19 |
|
20 |
#Output the pairs with their score
|
21 |
for i in range(len(sentences1)):
|
22 |
-
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
st.title("Paraphrase Mining Example")
|
4 |
+
|
5 |
from sentence_transformers import SentenceTransformer, util
|
6 |
model = SentenceTransformer('all-MiniLM-L6-v2')
|
7 |
|
|
|
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 |
+
|