Tried to create a on-change menu using
selected5 = option_menu(None, ["Home", "Upload", "Tasks", 'Settings'],
icons=['house', 'cloud-upload', "list-task", 'gear'],
on_change=update_new, key='menu_5', orientation="horizontal")
selected5
and call switch_model inside the callback function, which produced the warning: Calling st.rerun() within a callback is a no-op.
Anyway to overcome this?