Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ Feedback: LLM-based applications have several limitations, including limited tok
|
|
82 |
# Function to clean AI response by removing unwanted formatting
|
83 |
def clean_response(response):
|
84 |
"""Removes <think> tags, asterisks, and markdown formatting."""
|
85 |
-
cleaned_text = re.sub(r"<think>.*?</think>", "", response, flags=re.DOTALL)
|
86 |
cleaned_text = re.sub(r"(\*\*|\*)", "", cleaned_text)
|
87 |
cleaned_text = re.sub(r"^#+\s*", "", cleaned_text, flags=re.MULTILINE)
|
88 |
return cleaned_text.strip()
|
|
|
82 |
# Function to clean AI response by removing unwanted formatting
|
83 |
def clean_response(response):
|
84 |
"""Removes <think> tags, asterisks, and markdown formatting."""
|
85 |
+
#cleaned_text = re.sub(r"<think>.*?</think>", "", response, flags=re.DOTALL)
|
86 |
cleaned_text = re.sub(r"(\*\*|\*)", "", cleaned_text)
|
87 |
cleaned_text = re.sub(r"^#+\s*", "", cleaned_text, flags=re.MULTILINE)
|
88 |
return cleaned_text.strip()
|