nickmuchi commited on
Commit
06569eb
·
1 Parent(s): 0c850db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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.write('encoding passages into a vector space...')
128
- corpus_embeddings = bi_encoder.encode(passages, convert_to_tensor=True, show_progress_bar=True)
 
129
 
130
- st.write(f"Embeddings computed. Shape: {corpus_embeddings.shape}")
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