import streamlit as st
import numpy as np
st.header("Usando o Sidebar")
# Using object notation
add_selectbox = st.sidebar.selectbox(
"How would you like to be contacted?",
("Email", "Home phone", "Mobile phone")
)
# Using "with" notation
with st.sidebar:
add_radio = st.radio(
"Choose a shipping method",
("Standard (5-15 days)", "Express (2-5 days)")
)
col1, col2 = st.columns(2)
with col1:
st.header("Desenvolvimento Assistente Virtual com Python")
with col2:
st.header("Desenvolvimento Web com Flask")
st.header("Utilizando o Expander")
st.bar_chart({"data": [1, 5, 2, 6, 2, 1]})
with st.expander("See explanation"):
st.write("""
The chart above shows some numbers I picked for you.
I rolled actual dice for these, so they're *guaranteed* to
be random.
""")
st.image("https://static.streamlit.io/examples/dice.jpg")
st.header("Utilizando Containers")
with st.container():
st.write("This is inside the container")
# You can call any Streamlit command, including custom components:
st.bar_chart(np.random.randn(50, 3))
st.write("This is outside the container")
st.header("Container Vazio")
placeholder = st.empty()
# Replace the placeholder with some text:
placeholder.text("Hello")
# Replace the text with a chart:
placeholder.line_chart({"data": [1, 5, 2, 6]})
# Replace the chart with several elements:
with placeholder.container():
st.write("This is one element")
st.write("This is another")
# Clear all those elements:
placeholder.empty()