Thiago Vieira commited on
Commit
79cd1c0
·
1 Parent(s): ba859d6

return to old st.cache

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,7 +14,7 @@ print()
14
  print(subprocess.run(['ls -la models/'], shell=True))
15
  print()
16
  print(subprocess.run(['ls -la content/'], shell=True))
17
- subprocess.run(['pip install --upgrade streamlit'], shell=True)
18
 
19
 
20
  def main():
@@ -136,7 +136,7 @@ def print_docs(docs):
136
  ''', unsafe_allow_html=True)
137
 
138
 
139
- @st.cache_resource
140
  def load_docs():
141
  # Processing DOCUMENTS
142
  doc_set = {}
@@ -162,7 +162,7 @@ def load_docs():
162
  return list(doc_set.values())
163
 
164
 
165
- @st.cache_resource
166
  def load_models():
167
 
168
  bm25_simple_file, _ = urllib.request.urlretrieve(
 
14
  print(subprocess.run(['ls -la models/'], shell=True))
15
  print()
16
  print(subprocess.run(['ls -la content/'], shell=True))
17
+ # subprocess.run(['pip install --upgrade streamlit'], shell=True)
18
 
19
 
20
  def main():
 
136
  ''', unsafe_allow_html=True)
137
 
138
 
139
+ @st.cache(ttl=3600, allow_output_mutation=True, show_spinner=True, max_entries=2)
140
  def load_docs():
141
  # Processing DOCUMENTS
142
  doc_set = {}
 
162
  return list(doc_set.values())
163
 
164
 
165
+ @st.cache(ttl=3600, allow_output_mutation=True, show_spinner=True, max_entries=2)
166
  def load_models():
167
 
168
  bm25_simple_file, _ = urllib.request.urlretrieve(