tcy6 commited on
Commit
36af6ab
·
1 Parent(s): 56e4893

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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