How to automatically run function when user_input = max_chars in streamlit app

Dear Boss,

Is it possible to implement a feature in the Streamlit app where the function automatically executes when user_input equals max_chars? Additionally, I would like to know how to post st.text_data into a Pandas DataFrame.

Please guide me on how to accomplish this and provide the correct code.

Thank you in advance for your assistance.