Allob commited on
Commit
f414b62
1 Parent(s): f5f665e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -25,8 +25,9 @@ if st.button("Guess") or word:
25
  word_embedding = model.encode(word)
26
  similarity = util.pytorch_cos_sim(secred_embedding, word_embedding).cpu().numpy()[0][0]
27
  st.session_state['words'].append((word, similarity))
28
- words_df = pd.DataFrame(
29
- st.session_state['words'],
30
- columns=["word", "similarity"]
31
- ).sort_values(by=["similarity"], ascending=False)
32
- st.dataframe(words_df)
 
 
25
  word_embedding = model.encode(word)
26
  similarity = util.pytorch_cos_sim(secred_embedding, word_embedding).cpu().numpy()[0][0]
27
  st.session_state['words'].append((word, similarity))
28
+
29
+ words_df = pd.DataFrame(
30
+ st.session_state['words'],
31
+ columns=["word", "similarity"]
32
+ ).sort_values(by=["similarity"], ascending=False)
33
+ st.dataframe(words_df)