@dataprofessor i recently came across the Llama 2 Chatbot app on streamlit and am curious on how does the input query refresh once we enter the text, coz i am trying to work with chatbot (not llama) but the query is still displayed on the query input after the submission as well.
def submit():
record_timing() # Record time before submitting message
st.session_state.something = st.session_state.widget # Save user input
st.session_state.widget = ‘’ # Clear user input
if user_prompt := st.text_input(“Your message here”, on_change=submit, key=“text_input”):
# Code for handling user input
here even after user submits the query, the text_input is not being cleared out