Spaces:
Running
on
Zero
Running
on
Zero
oweller2
commited on
Commit
·
fe7cffb
1
Parent(s):
535dc7a
make it optional
Browse files
app.py
CHANGED
@@ -76,7 +76,8 @@ def process_input(query: str, passage: str) -> tuple[str, str, str]:
|
|
76 |
thread.join()
|
77 |
|
78 |
# Add the stopping sequence and calculate final scores
|
79 |
-
|
|
|
80 |
|
81 |
with torch.no_grad():
|
82 |
final_scores = generation_output.scores[-1][0]
|
|
|
76 |
thread.join()
|
77 |
|
78 |
# Add the stopping sequence and calculate final scores
|
79 |
+
if "</think>" not in current_text:
|
80 |
+
current_text += "\n" + reranker.stopping_criteria[0].matched_sequence
|
81 |
|
82 |
with torch.no_grad():
|
83 |
final_scores = generation_output.scores[-1][0]
|