fittar commited on
Commit
026fc62
·
1 Parent(s): 4a66608

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,8 +6,8 @@ model_g = gensim.models.KeyedVectors.load_word2vec_format('v_glove_300d_2.0' , b
6
 
7
  #retrieve the most similar words
8
 
9
- def generate(text):
10
- result= model_g.most_similar('together',topn=10)
11
  return result
12
 
13
 
@@ -18,7 +18,7 @@ examples = [
18
  ]
19
 
20
  title = "Visually Grounded embeddings"
21
- description = 'Get the top 10 nearest neighbors from a visually grounded word embedding model described in [this paper](https://arxiv.org/abs/2206.08823).<br>'
22
  txt = gr.Textbox(lines=1, label="Query word", placeholder="muffin")
23
  out = gr.Textbox(lines=4, label="top 10 nearest neighbors")
24
 
 
6
 
7
  #retrieve the most similar words
8
 
9
+ def generate(word):
10
+ result= model_g.most_similar(word,topn=10)
11
  return result
12
 
13
 
 
18
  ]
19
 
20
  title = "Visually Grounded embeddings"
21
+ description = 'Get the top 10 nearest neighbors with cosine similarities from a visually grounded word embedding model described in [this paper](https://arxiv.org/abs/2206.08823).<br>'
22
  txt = gr.Textbox(lines=1, label="Query word", placeholder="muffin")
23
  out = gr.Textbox(lines=4, label="top 10 nearest neighbors")
24