Build a streamlit app where there is 3 tabs :
Drop files here
or click to upload
import streamlit as st
st.title("Three Tabs Demo")
# Create three tabs
tab1, tab2, tab3 = st.tabs(["Tab 1", "Tab 2", "Tab 3"])
# Content for Tab 1
with tab1:
st.header("Welcome to Tab 1")
st.write("This is the content of the first tab.")
st.write("You can add any Streamlit components here.")
# Add a sample button
if st.button("Click me!", key="tab1_button"):
st.write("Button in Tab 1 was clicked!")
# Content for Tab 2
with tab2:
st.header("Welcome to Tab 2")
st.write("This is the content of the second tab.")
# Add a sample slider
value = st.slider("Select a value", 0, 100, 50, key="tab2_slider")
st.write(f"Selected value: {value}")
# Content for Tab 3
with tab3:
st.header("Welcome to Tab 3")
st.write("This is the content of the third tab.")
# Add a sample text input
user_input = st.text_input("Enter some text:", key="tab3_input")
if user_input:
st.write(f"You entered: {user_input}")
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?