Lesterchia174 commited on
Commit
58c69a8
·
verified ·
1 Parent(s): 3d4be7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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()