Two issues regarding the st.number_input widget (rendering in Mobile vs PC)

Two issues regarding the st.number_input widget.

  1. I’m using the st.number_input in my streamlit app. I noticed that it renders as a st.text_input widget whenever I open the app in my Phone or Tablet vs when I do it on my computer browser.
    I’m hosting the app on an AWS EC2 instance (running Amazon-Linux); I’ve seen this behavior in other apps done by other people as well. Is this a bug?

  2. As an extra: Whenever I click the ā€œincreaseā€ button in the st.number_input-widget as fast as I can, the app crashes and the streamlit port is ā€œkilledā€ in the process. What could be the cause of this? When I run the app locally this doesn’t happen vs running it on the cloud (AWS) where this app-crash occurs whenever the widget is clicked fast.

Hi @A.A.Garcia

It would be helpful if you could share a minimum reproducible example showing st.number_input being rendered as st.text_input. Do you mean the +/- feature to the right is not appearing for the widget?

A possible reason for the app to crash when the increase button is pressed really fast would be that with each click, the app is being re-run. Consequently, multiple clicks would trigger multiple re-runs and if the max computational resource has been reached then the app may crash. A possible solution is to embed the st.number_input widget inside an st.form so that adjustments would not trigger the app to re-run with each interaction.

Hope this helps!

Hi @dataprofessor ,
As examples the following two apps may serve. I can’t show my code, unfortunately, but it’s basically the same issue, the st.number_input widget rendering differently in both mobile vs pc.

  1. https://unit-tests.streamlit.app/
  2. https://prompttools.streamlit.app/

Just as a side note, again, regarding the app crashing. Maybe it can occur due that I access the app via http only, instead of https? If you have some references of where I could find possible solutions to this sort of issue I’d appreciate it. I’m just starting out on the server-management side of things.