Spaces:
Build error
Build error
Download app.py from Prabhsimran09/Streamlit: direct link, hf CLI and curl.
- Browser
- Download file 398 Bytes
-
https://huggingface.co/spaces/Prabhsimran09/Streamlit/resolve/main/app.py
- Command line
-
hf download hf://spaces/Prabhsimran09/Streamlit/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Prabhsimran09/Streamlit/resolve/main/app.py
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() | |