awacke1 commited on
Commit
5ca8768
Β·
verified Β·
1 Parent(s): c1df40e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,13 +1,14 @@
1
  import streamlit as st
2
 
3
- # Function to cache user data
4
  #@st.cache(suppress_st_warning=True,allow_output_mutation=True, ttl=86400) # 86400 seconds = 1 day
5
  #@st.cache_data(ttl=86400) # 86400 seconds = 1 day
6
- @st.cache(suppress_st_warning=True, ttl=86400)
 
 
7
  def cache_user_data():
8
  return {'email': '', 'phone': '', 'password': ''}
9
 
10
- # Main app function
11
  def main():
12
  st.title('User Data Caching Example')
13
 
 
1
  import streamlit as st
2
 
 
3
  #@st.cache(suppress_st_warning=True,allow_output_mutation=True, ttl=86400) # 86400 seconds = 1 day
4
  #@st.cache_data(ttl=86400) # 86400 seconds = 1 day
5
+ #@st.cache(suppress_st_warning=True, ttl=86400)
6
+
7
+ @st.cache_data(experimental_allow_widgets=True) # πŸ‘ˆ Set the parameter
8
  def cache_user_data():
9
  return {'email': '', 'phone': '', 'password': ''}
10
 
11
+ @st.cache_data(experimental_allow_widgets=True) # πŸ‘ˆ Set the parameter
12
  def main():
13
  st.title('User Data Caching Example')
14