FlawedLLM commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -91,7 +91,7 @@ def chunk_it(input_command, item_list):
|
|
| 91 |
|
| 92 |
reply=tokenizer.batch_decode(outputs)
|
| 93 |
# Regular expression pattern to match content between "### Response:" and "<|end_of_text|>"
|
| 94 |
-
pattern = r"### Response:\n(.*?)
|
| 95 |
# Search for the pattern in the text
|
| 96 |
match = re.search(pattern, reply[0], re.DOTALL) # re.DOTALL allows '.' to match newlines
|
| 97 |
reply = match.group(1).strip() # Extract and remove extra whitespace
|
|
|
|
| 91 |
|
| 92 |
reply=tokenizer.batch_decode(outputs)
|
| 93 |
# Regular expression pattern to match content between "### Response:" and "<|end_of_text|>"
|
| 94 |
+
pattern = r"### Response:\n(.*?)<eos>"
|
| 95 |
# Search for the pattern in the text
|
| 96 |
match = re.search(pattern, reply[0], re.DOTALL) # re.DOTALL allows '.' to match newlines
|
| 97 |
reply = match.group(1).strip() # Extract and remove extra whitespace
|