nickmuchi commited on
Commit
d910295
·
1 Parent(s): 01985d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -130,7 +130,7 @@ def bi_encode(bi_enc,passages):
130
 
131
  st.success(f"Embeddings computed. Shape: {corpus_embeddings.shape}")
132
 
133
- return corpus_embeddings
134
 
135
  @st.cache(allow_output_mutation=True)
136
  def cross_encode():
@@ -317,7 +317,7 @@ if search:
317
  with st.spinner(
318
  text=f"Loading {bi_encoder_type} bi-encoder and embedding document into vector space. This might take a few seconds depending on the length of your document..."
319
  ):
320
- corpus_embeddings = bi_encode(bi_encoder_type,passages)
321
  cross_encoder = cross_encode()
322
  bm25 = bm25_api(passages)
323
 
 
130
 
131
  st.success(f"Embeddings computed. Shape: {corpus_embeddings.shape}")
132
 
133
+ return bi_encoder, corpus_embeddings
134
 
135
  @st.cache(allow_output_mutation=True)
136
  def cross_encode():
 
317
  with st.spinner(
318
  text=f"Loading {bi_encoder_type} bi-encoder and embedding document into vector space. This might take a few seconds depending on the length of your document..."
319
  ):
320
+ bi_encoder, corpus_embeddings = bi_encode(bi_encoder_type,passages)
321
  cross_encoder = cross_encode()
322
  bm25 = bm25_api(passages)
323