added EvalDataset Generation
Browse files
app.py
CHANGED
@@ -372,7 +372,6 @@ class BSIChatbot:
|
|
372 |
|
373 |
if rerankingStep == True:
|
374 |
if rerankingModel is None:
|
375 |
-
print("initializing Reranker-Model..")
|
376 |
self.initializeRerankingModel()
|
377 |
print("Starting Reranking Chunks...")
|
378 |
#rerankingModel
|
@@ -380,6 +379,7 @@ class BSIChatbot:
|
|
380 |
#newprint(type(retrieved_chunks_text))
|
381 |
#new print(retrieved_chunks_text)
|
382 |
with torch.no_grad():
|
|
|
383 |
retrieved_chunks_text = rerankingModel.rerank(query, retrieved_chunks_text, k=15)
|
384 |
#newprint("DBG:retrieved_chunks_text after rerank")
|
385 |
#newprint(type(retrieved_chunks_text))
|
@@ -493,7 +493,7 @@ class BSIChatbot:
|
|
493 |
# question=query, context=context, history=history[:-1]
|
494 |
# )
|
495 |
|
496 |
-
|
497 |
pattern = r"Filename:(.*?);"
|
498 |
last_value = final_prompt[-1]["content"]
|
499 |
|
|
|
372 |
|
373 |
if rerankingStep == True:
|
374 |
if rerankingModel is None:
|
|
|
375 |
self.initializeRerankingModel()
|
376 |
print("Starting Reranking Chunks...")
|
377 |
#rerankingModel
|
|
|
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=15)
|
384 |
#newprint("DBG:retrieved_chunks_text after rerank")
|
385 |
#newprint(type(retrieved_chunks_text))
|
|
|
493 |
# question=query, context=context, history=history[:-1]
|
494 |
# )
|
495 |
|
496 |
+
print(f"DBG: Final-Query:\n{final_prompt}")
|
497 |
pattern = r"Filename:(.*?);"
|
498 |
last_value = final_prompt[-1]["content"]
|
499 |
|