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