Spaces:
Running
Running
added thinking spinner
Browse files
app.py
CHANGED
@@ -94,7 +94,8 @@ def launch_bot():
|
|
94 |
if st.session_state.messages[-1]["role"] != "assistant":
|
95 |
with st.chat_message("assistant", avatar='π€'):
|
96 |
stream = generate_response(prompt, cfg)
|
97 |
-
|
|
|
98 |
message = {"role": "assistant", "content": response, "avatar": 'π€'}
|
99 |
st.session_state.messages.append(message)
|
100 |
|
|
|
94 |
if st.session_state.messages[-1]["role"] != "assistant":
|
95 |
with st.chat_message("assistant", avatar='π€'):
|
96 |
stream = generate_response(prompt, cfg)
|
97 |
+
with st.spinner('Thinking...'):
|
98 |
+
response = st.write_stream(stream)
|
99 |
message = {"role": "assistant", "content": response, "avatar": 'π€'}
|
100 |
st.session_state.messages.append(message)
|
101 |
|