Chatbot message appears twice

Try:

# Your code above...
with st.chat_message("assistant"):
   st.empty()
# Your code below...