Spaces:
Sleeping
Sleeping
bugfix
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ model = SentenceTransformer("rufimelo/Legal-BERTimbau-sts-base")
|
|
9 |
|
10 |
def compute_similarity(left_text: str, right_text: str) -> np.ndarray:
|
11 |
embeddings = model.encode([left_text, right_text])
|
12 |
-
print(embeddings)
|
13 |
similarity = cosine_similarity(embeddings[: 1], embeddings[1 :])
|
14 |
|
15 |
return similarity
|
@@ -18,4 +17,4 @@ first = st.text_input('First', 'This is a test')
|
|
18 |
second = st.text_input('Second', 'This is another test')
|
19 |
|
20 |
s = compute_similarity(left_text=first, right_text=second)
|
21 |
-
st.
|
|
|
9 |
|
10 |
def compute_similarity(left_text: str, right_text: str) -> np.ndarray:
|
11 |
embeddings = model.encode([left_text, right_text])
|
|
|
12 |
similarity = cosine_similarity(embeddings[: 1], embeddings[1 :])
|
13 |
|
14 |
return similarity
|
|
|
17 |
second = st.text_input('Second', 'This is another test')
|
18 |
|
19 |
s = compute_similarity(left_text=first, right_text=second)
|
20 |
+
st.dataframe(s)
|