Spaces:
Sleeping
Sleeping
removed print of logs inline
Browse files
app.py
CHANGED
@@ -129,7 +129,6 @@ def initialize_agent(agent_type: AgentType, _cfg):
|
|
129 |
|
130 |
def update_func(status_type: AgentStatusType, msg: str):
|
131 |
output = f"{status_type.value} - {msg}"
|
132 |
-
st.session_state.thinking_placeholder.text(output)
|
133 |
st.session_state.log_messages.append(output)
|
134 |
|
135 |
agent = Agent(
|
@@ -208,12 +207,10 @@ def launch_bot(agent_type: AgentType):
|
|
208 |
if st.session_state.messages[-1]["role"] != "assistant":
|
209 |
with st.chat_message("assistant", avatar='🤖'):
|
210 |
with st.spinner(st.session_state.thinking_message):
|
211 |
-
st.session_state.thinking_placeholder = st.empty()
|
212 |
res = st.session_state.agent.chat(prompt)
|
213 |
cleaned = re.sub(r'\[\d+\]', '', res).replace('$', '\\$')
|
214 |
message = {"role": "assistant", "content": cleaned, "avatar": '🤖'}
|
215 |
st.session_state.messages.append(message)
|
216 |
-
st.session_state.thinking_placeholder.empty()
|
217 |
st.rerun()
|
218 |
|
219 |
# Display log messages in an expander
|
|
|
129 |
|
130 |
def update_func(status_type: AgentStatusType, msg: str):
|
131 |
output = f"{status_type.value} - {msg}"
|
|
|
132 |
st.session_state.log_messages.append(output)
|
133 |
|
134 |
agent = Agent(
|
|
|
207 |
if st.session_state.messages[-1]["role"] != "assistant":
|
208 |
with st.chat_message("assistant", avatar='🤖'):
|
209 |
with st.spinner(st.session_state.thinking_message):
|
|
|
210 |
res = st.session_state.agent.chat(prompt)
|
211 |
cleaned = re.sub(r'\[\d+\]', '', res).replace('$', '\\$')
|
212 |
message = {"role": "assistant", "content": cleaned, "avatar": '🤖'}
|
213 |
st.session_state.messages.append(message)
|
|
|
214 |
st.rerun()
|
215 |
|
216 |
# Display log messages in an expander
|