Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,7 +115,6 @@ def search(query):
|
|
| 115 |
##### Sematic Search #####
|
| 116 |
# Encode the query using the bi-encoder and find potentially relevant passages
|
| 117 |
query_embedding = bi_encoder.encode(query, convert_to_tensor=True)
|
| 118 |
-
query_embedding = query_embedding.cuda()
|
| 119 |
hits = util.semantic_search(query_embedding, corpus_embeddings, top_k=top_k)
|
| 120 |
hits = hits[0] # Get the hits for the first query
|
| 121 |
|
|
|
|
| 115 |
##### Sematic Search #####
|
| 116 |
# Encode the query using the bi-encoder and find potentially relevant passages
|
| 117 |
query_embedding = bi_encoder.encode(query, convert_to_tensor=True)
|
|
|
|
| 118 |
hits = util.semantic_search(query_embedding, corpus_embeddings, top_k=top_k)
|
| 119 |
hits = hits[0] # Get the hits for the first query
|
| 120 |
|