Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -126,7 +126,7 @@ def retrieve_gradio(knowledge_base: str, query: str, topk: int):
|
|
126 |
|
127 |
query_with_instruction = "Represent this query for retrieving relavant document: " + query
|
128 |
with torch.no_grad():
|
129 |
-
query_rep = encode([query_with_instruction])
|
130 |
|
131 |
query_md5 = hashlib.md5(query.encode()).hexdigest()
|
132 |
|
|
|
126 |
|
127 |
query_with_instruction = "Represent this query for retrieving relavant document: " + query
|
128 |
with torch.no_grad():
|
129 |
+
query_rep = torch.Tensor(encode([query_with_instruction]))
|
130 |
|
131 |
query_md5 = hashlib.md5(query.encode()).hexdigest()
|
132 |
|