tcy6 commited on
Commit
5c2bfa7
1 Parent(s): 36af6ab

Update app.py

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