adjusted K-params
Browse files
app.py
CHANGED
|
@@ -379,12 +379,16 @@ class BSIChatbot:
|
|
| 379 |
#newprint(type(retrieved_chunks_text))
|
| 380 |
#new print(retrieved_chunks_text)
|
| 381 |
with torch.no_grad():
|
| 382 |
-
print("reranking chunks..")
|
| 383 |
retrieved_chunks_text = rerankingModel.rerank(query, retrieved_chunks_text, k=20)
|
| 384 |
#newprint("DBG:retrieved_chunks_text after rerank")
|
| 385 |
#newprint(type(retrieved_chunks_text))
|
| 386 |
#newprint(retrieved_chunks_text)
|
| 387 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
i = 1
|
| 390 |
for chunk in retrieved_chunks_text:
|
|
|
|
| 379 |
#newprint(type(retrieved_chunks_text))
|
| 380 |
#new print(retrieved_chunks_text)
|
| 381 |
with torch.no_grad():
|
| 382 |
+
print("reranking chunks (reverse)..")
|
| 383 |
retrieved_chunks_text = rerankingModel.rerank(query, retrieved_chunks_text, k=20)
|
| 384 |
#newprint("DBG:retrieved_chunks_text after rerank")
|
| 385 |
#newprint(type(retrieved_chunks_text))
|
| 386 |
#newprint(retrieved_chunks_text)
|
| 387 |
+
for chunk in reversed(retrieved_chunks_text):
|
| 388 |
+
print(chunk.rank)
|
| 389 |
+
retrieved_chunks_text = [chunk["content"] for chunk in reversed(retrieved_chunks_text)]
|
| 390 |
+
|
| 391 |
+
#retrieved_chunks_text = [chunk["content"] for chunk in retrieved_chunks_text]
|
| 392 |
|
| 393 |
i = 1
|
| 394 |
for chunk in retrieved_chunks_text:
|