i have 3 pages(using selectbox). and on page 3 there is a file.uploader component. If I upload a file on page 3 then I go to page 1 or 2 then the file and the whole process shown on page 3 will be lost. How to solve that so that when I return to page 3 the file and display will stay.
@st.experimental_memo
def load_dataset(data_pred):
df = pd.read_csv(data_pred)
return df
def app():
data_pred = st.sidebar.file_uploader("Upload your csv",type=['csv'])
if data_pred is not None:
df = load_dataset(data_pred)
if st.sidebar.button("predict Data"):
st.dataframe(df)