Is streamlit 0.73.x an officially released versoin?
By upgrading to or fresh installing 0.73.x, on my pc slider fails to show current value.
I tested with this simple code on Ubuntu18, python3.8. When I hover over slider’s current value mark by mouse, it is shown.
import streamlit as st
num = st.slider('num', min_value=1, max_value=1000, step=10)
I tested with pip9.0.1 and pip20.3.3 to install streamlit, either way it fails with 0.73.x.
0.72.0 works fine with both versions of pip.
Obviously it must be related to client code which runs on web broswer, and pip freeze
output is identical between any installation using 0.72.0 or 0.73.x, except for streamlit version itself. I got tricked into believing 0.72.0 had same issue but I needed to restart web browser after testing 0.73.x .
At the moment I can stick to 0.72.0.
Any workaround suggestions if I have to use 0.73.x ?
0.74.x is released but no change of the slider situation.
Can we have option to programatically enalbe old behavior, which is to show current value always, in future releases?
Web browser window is small. If slider shows current value, no need to do st.write(current_value) using more space. We have many sliders in sidebar and the space is limited. Table layout is not possible in sidebar at the moment so we cannot display current value side by side to slider.
Another option is to display all current values somewhere so that users can see w/o hovering, but that might clutter the browser window, make it look less stylish.
Or, use another component implementation of slider.
I will need to upgrade streamlit version sooner or later since currently there is a bug in sidebar that shows extra empty space at the top.
Both of the issues are annoying to our end user…
Now the issue is closed,
saying there is no way to do it using current version of BaseWeb.
so doable options for now can be something like below。
The first one would be the one to go, but order of description text and slider itself will be reversed.
import streamlit as st
num1 = st.slider('', min_value=1, max_value=1000, step=10, key='num_slider_01')
st.write(f'num1 = {num1}')
st.write(' ') # add vertical space for visibility
num2 = st.slider('using slider label', min_value=1, max_value=1000, step=10, key='num_slider_02')
st.write(f'num2 = {num2}')
st.write(' ') # add vertical space for visibility
placeholder = st.empty()
num3 = st.slider('', min_value=1, max_value=1000, step=10, key='num_slider_03')
placeholder.write(f'placeholder num3 = {num3}')
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.