Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,10 @@ history_log = []
|
|
21 |
show_history_flag = False
|
22 |
|
23 |
def clean_response(text):
|
24 |
-
|
|
|
|
|
|
|
25 |
|
26 |
def chatbot_response(user_input, model_name):
|
27 |
model_id = MODELS[model_name]
|
|
|
21 |
show_history_flag = False
|
22 |
|
23 |
def clean_response(text):
|
24 |
+
text = re.sub(r"</?think>", "", text)
|
25 |
+
text = re.sub(r"\\boxed\{.*?\}", "", text)
|
26 |
+
|
27 |
+
return text.strip()
|
28 |
|
29 |
def chatbot_response(user_input, model_name):
|
30 |
model_id = MODELS[model_name]
|