arindamsaha1507 / sankhyaakaara

GNU General Public License v3.0
1 stars 2 forks source link

number_input instead of text? #9

Closed thakkaha closed 1 year ago

thakkaha commented 1 year ago

uttamam! @arindamsaha1507

i am new to streamlit ... but was wondering, (after looking at some if/else) - can we replace line 15 in app.py

query = st.text_input("Please enter a number") with query = st.number_input("Please enter a number", min_value=0, step=1) ?

arindamsaha1507 commented 1 year ago

Thanks @thakkaha

I myself like number_input().

However, the max_value that it accepts is approx. 10^15 which is less than the 10^18 numbers that can be named :D

This limit is seemingly put by JavaScript... :( See this

https://chat.openai.com/share/bcdfd633-546f-470e-99c1-4a939b708889

But the code is much cleaner withnumber_input(). Plus more people seem to like interface of number_input().

What do you suggest? Should we go for the number_input()?

thakkaha commented 1 year ago

yes @arindamsaha1507 - let's try number_input() then 👍 dhanyavaadaH

arindamsaha1507 commented 1 year ago

Done 👍✅