hacpdsae2023 commited on
Commit
366746e
·
1 Parent(s): c319aca

Modified the score to get the number not the tensor

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ embedding_input_topic = model.encode(input_topic)
31
  #st.write(x, 'squared is', x * x, 'embedding', embedding[0][0])
32
  #st.write('The embedding of', '"' + input_sentence + '"', 'at position',x,'is',embedding[0][int(x)])
33
 
34
- cos_scores = util.cos_sim(embedding_input_topic, embedding_sentence)[0]
35
 
36
  st.write('Score for topic', input_topic, ':', cos_scores)
37
 
 
31
  #st.write(x, 'squared is', x * x, 'embedding', embedding[0][0])
32
  #st.write('The embedding of', '"' + input_sentence + '"', 'at position',x,'is',embedding[0][int(x)])
33
 
34
+ cos_scores = util.cos_sim(embedding_input_topic, embedding_sentence)[0][0]
35
 
36
  st.write('Score for topic', input_topic, ':', cos_scores)
37