Great work!
Is there a more recent example of this that I can look at ?
My text seems to show only the latest text and is not showing as the user text , is showing as the bot text instead.
Pls refer to my code , based on the example from above post , below.
Thanks!
import streamlit as st
from streamlit_chat import message
message_history= []
message("My message")
for message_ in message_history:
message(message_) # display all the previous message
placeholder = st.empty() # placeholder for latest message
input_ = st.text_input("you:")
message_history.append(input_)
with placeholder.container():
message(message_history[-1]) # display the latest message