Update app.py
Browse files
app.py
CHANGED
@@ -124,10 +124,11 @@ def bi_encode(bi_enc,passages):
|
|
124 |
bi_encoder = SentenceTransformer(bi_enc)
|
125 |
|
126 |
#Compute the embeddings using the multi-process pool
|
127 |
-
st.
|
128 |
-
|
|
|
129 |
|
130 |
-
st.
|
131 |
|
132 |
return corpus_embeddings
|
133 |
|
|
|
124 |
bi_encoder = SentenceTransformer(bi_enc)
|
125 |
|
126 |
#Compute the embeddings using the multi-process pool
|
127 |
+
with st.spinner('Encoding passages into a vector space...'):
|
128 |
+
|
129 |
+
corpus_embeddings = bi_encoder.encode(passages, convert_to_tensor=True, show_progress_bar=True)
|
130 |
|
131 |
+
st.success(f"Embeddings computed. Shape: {corpus_embeddings.shape}")
|
132 |
|
133 |
return corpus_embeddings
|
134 |
|