Streamlit / app.py
Prabhsimran09's picture
Update app.py
4caa8dd verified
Raw
History Blame Contribute Delete
398 Bytes
import streamlit as st
# Title of the app
st.title("Hello App")
# Text input from user
name = st.text_input("Enter your name")
# Button to submit the input
if st.button("Submit"):
if name:
st.success(f"Hello, {name}!")
else:
st.warning("Please enter your name.")
# Clear button
if st.button("Clear"):
st.rerun() # Updated from st.experimental_rerun() to st.rerun()