Spaces:
Running
Running
bugfix
Browse files
app.py
CHANGED
@@ -164,7 +164,7 @@ def launch_bot(agent_type: AgentType):
|
|
164 |
with st.spinner(st.session_state.thinking_message):
|
165 |
st.session_state.thinking_placeholder = st.empty()
|
166 |
res = st.session_state.agent.chat(prompt)
|
167 |
-
cleaned = re.sub(r'\[\d+\]', '', res
|
168 |
st.write(cleaned)
|
169 |
message = {"role": "assistant", "content": cleaned, "avatar": '🤖'}
|
170 |
st.session_state.messages.append(message)
|
|
|
164 |
with st.spinner(st.session_state.thinking_message):
|
165 |
st.session_state.thinking_placeholder = st.empty()
|
166 |
res = st.session_state.agent.chat(prompt)
|
167 |
+
cleaned = re.sub(r'\[\d+\]', '', res).replace('$', '\\$')
|
168 |
st.write(cleaned)
|
169 |
message = {"role": "assistant", "content": cleaned, "avatar": '🤖'}
|
170 |
st.session_state.messages.append(message)
|