Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
from sentence_transformers import SentenceTransformer
|
3 |
|
4 |
# Load the pre-trained model
|
@@ -13,5 +14,7 @@ if sentences:
|
|
13 |
# Split sentences by new line
|
14 |
sentences_list = [s.strip() for s in sentences.split('\n') if s.strip()]
|
15 |
# Get embeddings
|
16 |
-
embeddings = model.encode(sentences_list)
|
17 |
-
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
+
import numpy as np
|
3 |
from sentence_transformers import SentenceTransformer
|
4 |
|
5 |
# Load the pre-trained model
|
|
|
14 |
# Split sentences by new line
|
15 |
sentences_list = [s.strip() for s in sentences.split('\n') if s.strip()]
|
16 |
# Get embeddings
|
17 |
+
embeddings = model.encode(sentences_list)
|
18 |
+
# Convert to 2D NumPy array
|
19 |
+
embeddings_array = np.array(embeddings)
|
20 |
+
st.write(embeddings_array)
|