nickmuchi commited on
Commit
314f1c1
·
1 Parent(s): d9e6ed8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -186,7 +186,7 @@ def search(query, top_k=2):
186
  ##### Sematic Search #####
187
  # Encode the query using the bi-encoder and find potentially relevant passages
188
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True)
189
- question_embedding = question_embedding.gpu()
190
  hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k)
191
  hits = hits[0] # Get the hits for the first query
192
 
 
186
  ##### Sematic Search #####
187
  # Encode the query using the bi-encoder and find potentially relevant passages
188
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True)
189
+ question_embedding = question_embedding.cpu()
190
  hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k)
191
  hits = hits[0] # Get the hits for the first query
192