I’m merging my current project with a streamlit frontend. I have a main app.py to control the whole page, while there are some log/prints/progress in other imported modules or classes i’d like to show either. Besides passing a positional st.empty() object into it and write, I’m thinking use st.write() to show things if frontend is on. Since it’s also possible that I run these scripts directly in python console, st.write is bypassed, of cause, but i get these warnings:
Blockquote
Warning: to view this Streamlit app on a browser, run it with the following
command:
streamlit run C:\Program Files\JetBrains\PyCharm 2020.1\plugins\python\helpers\pydev\pydevconsole.py [ARGUMENTS]
Is there a way to suppress these warnings because it’s exactly what I want ?
I would also like to turn this off, as I can call my script from both the command line or as an interactive app – is there a solution for suppressing this warning?
Thank you so much Randy! I didn’t initially think this would be found in the config settings, but that does make sense now. Your solution works perfectly
This is not the same issue. In this case, the warning is letting you know that for the code version of Streamlit you have installed, you should rename any references to st.beta_columns to st.columns.
@st.dialog(“Get Full Data”)
def show_dialog():
st.write("Suggestion: Currently you are trying to fetch a huge amount of data. "
“I would suggest using various filters and groups to reduce the size of the data.”)
st.write(“Still, do you want to fetch full Data?”)
# Create columns for “Yes” and “No” buttons
col1, col2 = st.columns(2)
with col1:
st.button(“Yes”, on_click=vote, args=(True,),key=‘Yes_key’)
with col2:
st.button(“No”, on_click=vote, args=(False,),key=‘No_key’)
st.rerun()
st.button(“Get Full Data”,on_click=show_dialog,key=f’full_data_key1’)
I need dialog box with yes and no button and on click of button get
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
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.
Performance cookies
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.
Functional cookies
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.
Targeting cookies
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.