I use many way to solve it like upgrade streamlit, some times is changes streamlit version.Use @st.cache,st,cache_resources but it didnot work.Every time it showing st.cache is deprecated.I share my code in this question.this mainfile.csv have user login user and password.`
# Define the file path
FILE_PATH = "/content/drive/MyDrive/Streamlit/login/mainfile.csv"
# Use st.cache_data for data loading
@st.cache_resource
def load_data(file_path):
try:
df = pd.read_csv(file_path)
return df
except Exception as e:
st.error(f"Error loading data: {e}")
return pd.DataFrame()
New contributor
Md. Toufiq Zumma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.