Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def respond(message, history, system_message, max_tokens, temperature, top_p):
|
|
| 52 |
Extracts and returns content between <user>...</user> tags in the given text.
|
| 53 |
If multiple such sections exist, their contents are concatenated.
|
| 54 |
"""
|
| 55 |
-
pattern = re.compile(r'<user>(.*?)</user>|output:', re.IGNORECASE)
|
| 56 |
matches = re.findall(pattern, text, re.DOTALL)
|
| 57 |
extracted_content = '\n'.join(match.strip() for match in matches)
|
| 58 |
return extracted_content
|
|
|
|
| 52 |
Extracts and returns content between <user>...</user> tags in the given text.
|
| 53 |
If multiple such sections exist, their contents are concatenated.
|
| 54 |
"""
|
| 55 |
+
pattern = re.compile(r'<user>(.*?)</user>|output:', re.IGNORECASE)
|
| 56 |
matches = re.findall(pattern, text, re.DOTALL)
|
| 57 |
extracted_content = '\n'.join(match.strip() for match in matches)
|
| 58 |
return extracted_content
|