Thank the team for making this awesome tool.
I know that we can set this mode in setting. Is there any way to set the widemode by default?
Thank you
Thank the team for making this awesome tool.
I know that we can set this mode in setting. Is there any way to set the widemode by default?
Thank you
Hi @Tiep_Vu_Huu.
There is no way to turn wide mode on by default today, but we have an open feature request here: https://github.com/streamlit/streamlit/issues/314 (And we’re looking for contributors )
I know this discussion is old, but I ended up here yesterday searching for the same thing, so I guess it’s worth to answer. Right now, on the version 0.77.0, it’s possible to set the wide mode by default with the streamlit.set_page_config method.
I have set the st.set_page_config(layout=‘wide’), but the page goes back centered after refreshing the page, anyone has a way to solve it?
I also had the issue where wide page layout was resetting to standard / non-wide mode on reload.
The fix in my case was moving page config initialisation from module scope into a function - i.e. from
import streamlit as st
st.set_page_config(layout="wide")
...
to
import streamlit as st
def do_stuff_on_page_load(...):
st.set_page_config(layout="wide")
...
The former worked fine up until Streamlit 1.2 or thereabouts.
import streamlit as st
def wide_space_default():
st.set_page_config(layout=“wide”)
wide_space_default()
JUST put this code in starting of ur main file…issue will be solved
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.