tcy6 commited on
Commit
415a781
1 Parent(s): c0e4e6e

Update app.pyy

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -142,7 +142,7 @@ def retrieve_gradio(knowledge_base: str, query: str, topk: int):
142
  topk_doc_ids_np = topk_doc_ids.cpu().numpy()
143
 
144
  similarities_np = similarities.cpu().numpy()
145
-
146
  images_topk = [Image.open(os.path.join(target_cache_dir, f"{md5s[idx]}.png")) for idx in topk_doc_ids_np]
147
 
148
  with open(os.path.join(target_cache_dir, f"q-{query_md5}.json"), 'w') as f:
 
142
  topk_doc_ids_np = topk_doc_ids.cpu().numpy()
143
 
144
  similarities_np = similarities.cpu().numpy()
145
+ print(f"topk_doc_ids_np: {topk_doc_ids_np}, topk_values_np: {topk_values_np}")
146
  images_topk = [Image.open(os.path.join(target_cache_dir, f"{md5s[idx]}.png")) for idx in topk_doc_ids_np]
147
 
148
  with open(os.path.join(target_cache_dir, f"q-{query_md5}.json"), 'w') as f: