Closed smalbec closed 3 years ago
If you try to have a slider that has more than 8 digits, it will freeze the website and never load the input
I run the code with
"C:\MyActualPath\code\webapp.py"
Code snippet:
slider = st.sidebar.slider('AidAmount_mean', 0, 123456789, 5)
Expected behavior:
Should load just fine as it supports doubles and ints
Actual behavior:
Every time I try to add a number bigger than 8 (even 8 struggles), when I load the site it will freeze for a minute and then never load the slider
Full code:
import pandas as pd import streamlit as st st.write(""" # NY Crime Prediction App """) st.sidebar.header('User Input Parameters') def user_input_features(): AidAmount_mean = st.sidebar.slider('AidAmount_mean', 0, 1234567, 5) CrimesReported_mean = st.sidebar.slider('CrimesReported_mean', 0, 50562, 9340) data = {'AidAmount_mean': AidAmount_mean, 'CrimesReported_mean': CrimesReported_mean} features = pd.DataFrame(data, index=[0]) return features df = user_input_features() st.subheader('User Input parameters') st.write(df)```
This isn't a bug, let's continue the discussion at the community forum:
https://discuss.streamlit.io/t/siderbar-slider-cant-handle-more-than-8-digit-inputs-3206/12527/2
Best, Randy
Summary
If you try to have a slider that has more than 8 digits, it will freeze the website and never load the input
Steps to reproduce
I run the code with
"C:\MyActualPath\code\webapp.py"
Code snippet:
slider = st.sidebar.slider('AidAmount_mean', 0, 123456789, 5)
Expected behavior:
Should load just fine as it supports doubles and ints
Actual behavior:
Every time I try to add a number bigger than 8 (even 8 struggles), when I load the site it will freeze for a minute and then never load the slider
Debug info
Full code: