import streamlit as st
1with st.sidebar:
2 st.header("I'm a sidebar")
st.write("We can use inputs our sidebar too.")
name = st.text_input("What's your name?", value=None)
st.title("Greeting App!")
3if name is not None:
st.write(f"Nice to meet you, {name}!")
else:
st.write("I can't greet you until you enter your name!")- 1
-
We can use the
withnotation along withst.sidebarto create the sidebar - 2
- We indent the code we want to exist within the sidebar
- 3
- Once we write a line of code that is not indented, this signals the beginning of code that will just appear in the main area of the streamlit app.



