Spaces:
Sleeping
Sleeping
| # app.py | |
| import streamlit as st | |
| # Title of the app | |
| st.title("My First Space") | |
| # Header | |
| st.header("Welcome to Streamlit!") | |
| # Subheader | |
| st.subheader("This is a simple app to demonstrate Streamlit's capabilities.") | |
| # Text | |
| st.write("Streamlit is an open-source Python library that makes it easy to create web apps for data science and machine learning.") | |
| # Input from the user | |
| user_input = st.text_input("Enter your name:") | |
| # Display the input | |
| if user_input: | |
| st.write(f"Hello, {user_input}! Welcome to the world of Streamlit.") | |
| # Slider example | |
| age = st.slider("Select your age:", min_value=0, max_value=100, value=25) | |
| st.write(f"You selected: {age} years old.") | |
| # Button example | |
| if st.button("Click Me"): | |
| st.success("You clicked the button!") | |
| else: | |
| st.info("Click the button above to see a success message.") |