Update app.py
Browse files
app.py
CHANGED
|
@@ -83,10 +83,7 @@ if prompt := st.chat_input():
|
|
| 83 |
assistant_message_placeholder = st.chat_message("assistant").empty()
|
| 84 |
|
| 85 |
with st.spinner("Translating Dubs language (Woof Woof!)"):
|
| 86 |
-
|
| 87 |
-
for partial_response in call_api(prompt):
|
| 88 |
-
bot_response += partial_response
|
| 89 |
-
assistant_message_placeholder.write(bot_response) # Update incrementally
|
| 90 |
|
| 91 |
# Append the final assistant's response to the chat history
|
| 92 |
st.session_state["messages"].append({"role": "assistant", "content": bot_response})
|
|
|
|
| 83 |
assistant_message_placeholder = st.chat_message("assistant").empty()
|
| 84 |
|
| 85 |
with st.spinner("Translating Dubs language (Woof Woof!)"):
|
| 86 |
+
assistant_message_placeholder.write_stream(call_api(prompt)) # Update incrementally
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
# Append the final assistant's response to the chat history
|
| 89 |
st.session_state["messages"].append({"role": "assistant", "content": bot_response})
|