peter2000 commited on
Commit
0bde925
1 Parent(s): ad992d1

Update apps/intro.py

Browse files
Files changed (1) hide show
  1. apps/intro.py +2 -1
apps/intro.py CHANGED
@@ -13,6 +13,7 @@ def init_models():
13
  REPO_ID = "peter2000/umap_embed_3d_all-MiniLM-L6-v2"
14
  FILENAME = "umap_embed_3d_all-MiniLM-L6-v2.sav"
15
  umap_model= joblib.load(cached_download(hf_hub_url(REPO_ID, FILENAME)))
 
16
 
17
  def app():
18
  word_to_embed_list = st.session_state['embed_list']
@@ -29,7 +30,7 @@ def app():
29
  if st.button("Embed"):
30
  with st.spinner("👑 Embedding your input"):
31
 
32
- init_models()
33
 
34
 
35
  word_to_embed_list.append(word_to_embed)
 
13
  REPO_ID = "peter2000/umap_embed_3d_all-MiniLM-L6-v2"
14
  FILENAME = "umap_embed_3d_all-MiniLM-L6-v2.sav"
15
  umap_model= joblib.load(cached_download(hf_hub_url(REPO_ID, FILENAME)))
16
+ return model, umap_model
17
 
18
  def app():
19
  word_to_embed_list = st.session_state['embed_list']
 
30
  if st.button("Embed"):
31
  with st.spinner("👑 Embedding your input"):
32
 
33
+ model, umap_model = init_models()
34
 
35
 
36
  word_to_embed_list.append(word_to_embed)