Tạo 1 ứng dụng để nhập data, gồm 2 tab: "Tab 1", Tab 2"; Khi click vào tab 1 thì hiển th ị các data input để nhập và lưu dữ liệu, tương tự đối với tab 2
To upload files, please first save the app
import streamlit as st
st.title('Data Input Application')
tabs = st.tabs(['Tab 1', 'Tab 2'])
with tabs[0]:
st.header('Input Data for Tab 1')
name = st.text_input('Enter your name')
age = st.number_input('Enter your age', min_value=0)
if st.button('Save Data for Tab 1'):
st.success(f'Data Saved for Tab 1: Name - {name}, Age - {age}')
with tabs[1]:
st.header('Input Data for Tab 2')
address = st.text_input('Enter your address')
phone_number = st.text_input('Enter your phone number')
if st.button('Save Data for Tab 2'):
st.success(f'Data Saved for Tab 2: Address - {address}, Phone Number - {phone_number}')
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?