forked from tylerprogramming/ai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3a42dd
commit d1344f7
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.") | ||
|
||
|