Spaces:
Sleeping
Sleeping
Commit
·
336ea26
1
Parent(s):
18aa47b
Putting input sentence in a list; changing the output syntax
Browse files
app.py
CHANGED
@@ -12,12 +12,12 @@ sentence = ['This framework generates embeddings for each input sentence']
|
|
12 |
|
13 |
|
14 |
#Sentences are encoded by calling model.encode()
|
15 |
-
embedding = model.encode(input_sentence)
|
16 |
|
17 |
x = st.slider('Select a value')
|
18 |
#embedding = model.encode(input_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][0])
|
21 |
|
22 |
|
23 |
uploaded_file = st.file_uploader("Choose a file")
|
|
|
12 |
|
13 |
|
14 |
#Sentences are encoded by calling model.encode()
|
15 |
+
embedding = model.encode([input_sentence])
|
16 |
|
17 |
x = st.slider('Select a value')
|
18 |
#embedding = model.encode(input_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][0])
|
21 |
|
22 |
|
23 |
uploaded_file = st.file_uploader("Choose a file")
|