To upload files, please first save the app
import streamlit as st
import pandas as pd
import numpy as np
1/0
# Create some sample data
x = np.linspace(0, 10, 100)
y = np.sin(x)
# Add some text
st.title('Simple Streamlit App')
st.write('Welcome! This is a basic demonstration of Streamlit.')
# Create tabs
tabs = st.tabs(["Sample Data", "Line Plot", "Area Chart", "Interactive Elements"])
with tabs[0]:
st.subheader('Sample Data')
df = pd.DataFrame({
'x': x,
'y': y
})
st.dataframe(df.head())
with tabs[1]:
st.subheader('Line Plot')
st.line_chart(df.set_index('x'))
with tabs[2]:
st.subheader('Area Chart')
st.area_chart(df.set_index('x'))
with tabs[3]:
st.subheader('Interactive Elements')
name = st.text_input('Enter your name')
if name:
st.write(f'Hello {name}!')
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?