Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def retrieve_gradio(knowledge_base: str, query: str, topk: int):
|
|
141 |
|
142 |
topk_values_np = topk_values.cpu().numpy()
|
143 |
|
144 |
-
topk_doc_ids_np = topk_doc_ids.squeeze().cpu().numpy()
|
145 |
|
146 |
similarities_np = similarities.cpu().numpy()
|
147 |
print(f"topk_doc_ids_np: {topk_doc_ids_np}, topk_values_np: {topk_values_np}")
|
|
|
141 |
|
142 |
topk_values_np = topk_values.cpu().numpy()
|
143 |
|
144 |
+
topk_doc_ids_np = topk_doc_ids.squeeze(0).cpu().numpy()
|
145 |
|
146 |
similarities_np = similarities.cpu().numpy()
|
147 |
print(f"topk_doc_ids_np: {topk_doc_ids_np}, topk_values_np: {topk_values_np}")
|