Build User Input UI with Streamlit

Learn how to take user input in Streamlit.

Taking input from the user

Here we’ll allow the user to input data and display the prediction.

We’ll use the following methods:

  • text_input(str): This method takes a string as a parameter and creates a text input field with the input parameter as its label.

  • st.selectbox(str, options = ): This method creates a drop-down menu. It takes in two parameters, the string to use as the label and the list of options. The options need to be passed as a ...