Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ umap_3d = prepare_umap()
|
|
| 40 |
|
| 41 |
|
| 42 |
secret_word =choose_secret_word()
|
| 43 |
-
secret_embedding = model.encode(secret_word)
|
| 44 |
|
| 45 |
print("Secret word ", secret_word)
|
| 46 |
|
|
@@ -79,7 +79,7 @@ used_words = [w for w, s in st.session_state['words']]
|
|
| 79 |
|
| 80 |
if st.button("Guess") or word:
|
| 81 |
if word not in used_words:
|
| 82 |
-
word_embedding = model.encode(word)
|
| 83 |
similarity = util.pytorch_cos_sim(
|
| 84 |
secret_embedding,
|
| 85 |
word_embedding
|
|
|
|
| 40 |
|
| 41 |
|
| 42 |
secret_word =choose_secret_word()
|
| 43 |
+
secret_embedding = model.encode(secret_word.lower().strip())
|
| 44 |
|
| 45 |
print("Secret word ", secret_word)
|
| 46 |
|
|
|
|
| 79 |
|
| 80 |
if st.button("Guess") or word:
|
| 81 |
if word not in used_words:
|
| 82 |
+
word_embedding = model.encode(word.lower().strip())
|
| 83 |
similarity = util.pytorch_cos_sim(
|
| 84 |
secret_embedding,
|
| 85 |
word_embedding
|