Skip to content

Commit

Permalink
added your first streamlit_app
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerprogramming committed May 24, 2024
1 parent d3a42dd commit d1344f7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions streamlit_apps/01-first-streamlit-app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import streamlit as st

st.title("Your First Streamlit App")

name = st.text_input("Enter your name:")
age = st.number_input("Enter your age: ", min_value=0, max_value=120, step=1)

color = st.selectbox("Select your favorite color: ", ["Red", "Yellow", "Orange", "Blue", "Green"])

show_more = st.checkbox("Show more information")

if st.button("Submit"):
age_in_dog_years = age * 7
st.write(f"Hello, {name}")
st.write(f"You are {age} years old, which is {age_in_dog_years} years old in dog years.")
st.write(f"Your favorite color is {color}.")

if show_more:
st.write("Here's more information just for you!")
st.write("Dogs typically live to be around 10-13 years old in human years.")


0 comments on commit d1344f7

Please sign in to comment.