Regarding Layout of Streamlit web app

Well @Marisa_Smith has a great short video on this :slight_smile: Streamlit Shorts: How to make a button - YouTube

In short:

t = st.text_area("Write smthg")
if st.button("Summarize"):
    # here apply your summary functions to the text input
    summary = t.lower()
    st.write(summary)

Try and play with this. If you get stuck because you need to preserve in memory the fact that the user has hit a certain button, know that this is managed by a small gist called SessionState and you can find snippets all around the forum using this gist to preserve state accross Streamlit runs (like here).

Fanilo

2 Likes