None of the above answers helped me cause it turns out that there is a page config that is set by default so that it is in a vertical layout. You can change it using this:
st.set_page_config(layout="wide")
You can also change this from the settings button at the top right of every Streamlit app that shows when developing the app.