tcy6 commited on
Commit
4b393ca
1 Parent(s): 14d7f4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -132,7 +132,7 @@ def retrieve_gradio(knowledge_base: str, query: str, topk: int):
132
 
133
  query_md5 = hashlib.md5(query.encode()).hexdigest()
134
 
135
- doc_reps_cat = torch.stack([torch.Tensor(i) for i in doc_reps], dim=0)
136
  print(f"doc_reps_shape: {doc_reps.shape}")
137
  print(f"query_rep_shape: {query_rep.shape}, doc_reps_cat_shape: {doc_reps_cat.shape}")
138
  similarities = torch.matmul(query_rep, doc_reps_cat.T)
 
132
 
133
  query_md5 = hashlib.md5(query.encode()).hexdigest()
134
 
135
+ doc_reps_cat = torch.cat([torch.Tensor(i) for i in doc_reps], dim=0)
136
  print(f"doc_reps_shape: {doc_reps.shape}")
137
  print(f"query_rep_shape: {query_rep.shape}, doc_reps_cat_shape: {doc_reps_cat.shape}")
138
  similarities = torch.matmul(query_rep, doc_reps_cat.T)