Spaces:
Sleeping
Sleeping
Commit
·
3152fdc
1
Parent(s):
a3ce6a9
correcting name of embedding
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ if uploaded_file1 is not None and uploaded_file2 is not None:
|
|
43 |
corpus_embeddings = embedder.encode(corpus, convert_to_tensor=True)
|
44 |
for topic in topics:
|
45 |
topic_embedding = embedder.encode(topic, convert_to_tensor=True)
|
46 |
-
cos_scores = util.cos_sim(
|
47 |
df1[str(topic)] = cos_scores
|
48 |
|
49 |
st.write(df1)
|
|
|
43 |
corpus_embeddings = embedder.encode(corpus, convert_to_tensor=True)
|
44 |
for topic in topics:
|
45 |
topic_embedding = embedder.encode(topic, convert_to_tensor=True)
|
46 |
+
cos_scores = util.cos_sim(topic_embedding, corpus_embeddings)[0]
|
47 |
df1[str(topic)] = cos_scores
|
48 |
|
49 |
st.write(df1)
|