I’m trying to create an uploader file that works as input for all my tabs.
please help me how to do it.
sample code:
selected = option_menu(None, [“Home”, “Upload”, “Tasks”, ‘Settings’],
icons=[‘house’, ‘cloud-upload’, “list-task”, ‘gear’],
menu_icon=“cast”, default_index=0, orientation=“horizontal”)
selected
if selected == “Home”:
st.title(f"You have selected {selected}“)
if selected == “Upload”:
st.title(f"You have selected {selected}”)
with st.header(‘1. Upload your CSV data’):
uploaded_file = st.file_uploader(“Upload your input file”, type=[‘csv’])
if selected == “Tasks”:
#st.title(f"You have selected {selected}")
### Read csv
iris = pd.read_table(uploaded_file , sep=‘,’, header=0)