legacy107 commited on
Commit
7717dbf
·
1 Parent(s): 751e496

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -66,7 +66,7 @@ def retrieve_context(query, contexts):
66
  corpus_embeddings = bi_encoder.encode(contexts, convert_to_tensor=True, show_progress_bar=False)
67
 
68
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True, show_progress_bar=False)
69
- question_embedding = question_embedding.cuda()
70
  hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k)
71
  hits = hits[0]
72
 
 
66
  corpus_embeddings = bi_encoder.encode(contexts, convert_to_tensor=True, show_progress_bar=False)
67
 
68
  question_embedding = bi_encoder.encode(query, convert_to_tensor=True, show_progress_bar=False)
69
+ question_embedding = question_embedding
70
  hits = util.semantic_search(question_embedding, corpus_embeddings, top_k=top_k)
71
  hits = hits[0]
72