Upload handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -155,7 +155,7 @@ def parse(generated_text: str, conclusions: list[tuple[str, str]], end_sequences
|
|
| 155 |
for conclusion_key, _ in conclusions:
|
| 156 |
if conclusion_key in generated_text:
|
| 157 |
conclusion_found = conclusion_key
|
| 158 |
-
|
| 159 |
|
| 160 |
# Extract context numbers from the generated text
|
| 161 |
context_pattern = r"\[\d+\]"
|
|
|
|
| 155 |
for conclusion_key, _ in conclusions:
|
| 156 |
if conclusion_key in generated_text:
|
| 157 |
conclusion_found = conclusion_key
|
| 158 |
+
generated_text = generated_text.replace(conclusion_key, "")
|
| 159 |
|
| 160 |
# Extract context numbers from the generated text
|
| 161 |
context_pattern = r"\[\d+\]"
|