By default, Streamlit’s st.text_input function waits for the user to finish typing and press Enter before retrieving the input value. However, if you want to capture and process user input in real-time as they type, use streamlit-keyup.
st.text_input
Link to streamlit-keyup.