Spaces:
Running
on
Zero
Running
on
Zero
Update app.pyy
Browse files
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:
|