hacpdsae2023 commited on
Commit
7211aaa
·
1 Parent(s): 00e69cc

Changing the order of the execution of the embedding - it can be very inefficient though

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,9 +12,10 @@ sentence = ['This framework generates embeddings for each input sentence']
12
 
13
 
14
  #Sentences are encoded by calling model.encode()
15
- embedding = model.encode(sentence)
16
 
17
  x = st.slider('Select a value')
 
18
  #st.write(x, 'squared is', x * x, 'embedding', embedding[0][0])
19
  st.write('The embedding of', input_sentence, 'at position',x,'is',embedding[0][int(x)])
20
 
 
12
 
13
 
14
  #Sentences are encoded by calling model.encode()
15
+ #embedding = model.encode(sentence)
16
 
17
  x = st.slider('Select a value')
18
+ embedding = model.encode(sentence)
19
  #st.write(x, 'squared is', x * x, 'embedding', embedding[0][0])
20
  st.write('The embedding of', input_sentence, 'at position',x,'is',embedding[0][int(x)])
21