Streamlit doesn't open new tabs from webbrowser library

i have a simple code such as this

st.checkbox("Google Translate", key="Google")
def new_word():
    word = st.session_state["new word"]
    if st.session_state["Google"]:
        webbrowser.open(f"https://translate.google.com/?sl=en&tl=vi&text={word}")
st.text_input(label="Enter a word to check then press 'Enter'",
              placeholder="Swim, climb, drink coffee, etc",
              on_change=new_word,
              key="new word")

As it’s supposed this app shoud take a word as an input and open it in a new tab.
However, the app works fine only on my local server, and the same version on streamlit doesn’t open any tabs.

This will not work on Streamlit Cloud, see also here:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.