Spaces:
Running
Running
Update apps/intro.py
Browse files- apps/intro.py +5 -3
apps/intro.py
CHANGED
@@ -32,13 +32,15 @@ def app():
|
|
32 |
|
33 |
model, umap_model = init_models()
|
34 |
|
35 |
-
|
36 |
-
word_to_embed_list.append(
|
|
|
37 |
st.session_state['embed_list'] = word_to_embed_list
|
38 |
cat_list .append(cat)
|
39 |
st.session_state['cat_list '] = cat_list
|
40 |
|
41 |
-
|
|
|
42 |
|
43 |
examples_umap = umap_model.transform(examples_embeddings)
|
44 |
|
|
|
32 |
|
33 |
model, umap_model = init_models()
|
34 |
|
35 |
+
|
36 |
+
word_to_embed_list.append(word_to_embed)
|
37 |
+
|
38 |
st.session_state['embed_list'] = word_to_embed_list
|
39 |
cat_list .append(cat)
|
40 |
st.session_state['cat_list '] = cat_list
|
41 |
|
42 |
+
phrase_to_embed = ["The book is about "+ wte for wte in word_to_embed_list]
|
43 |
+
examples_embeddings = model.encode(phrase_to_embed)
|
44 |
|
45 |
examples_umap = umap_model.transform(examples_embeddings)
|
46 |
|