Spaces:
Runtime error
Runtime error
Thiago Vieira
commited on
Commit
·
1a97549
1
Parent(s):
9b1e0fa
add old st.cache
Browse files
app.py
CHANGED
|
@@ -134,7 +134,7 @@ def print_docs(docs):
|
|
| 134 |
''', unsafe_allow_html=True)
|
| 135 |
|
| 136 |
|
| 137 |
-
@st.
|
| 138 |
def load_docs():
|
| 139 |
# Processing DOCUMENTS
|
| 140 |
doc_set = {}
|
|
@@ -158,7 +158,7 @@ def load_docs():
|
|
| 158 |
return list(doc_set.values())
|
| 159 |
|
| 160 |
|
| 161 |
-
@st.
|
| 162 |
def load_models():
|
| 163 |
with open(path + '/models/BM25_simple.pkl', 'rb') as file:
|
| 164 |
bm25_simple: BM25Simple = pickle.load(file)
|
|
|
|
| 134 |
''', unsafe_allow_html=True)
|
| 135 |
|
| 136 |
|
| 137 |
+
@st.cache(ttl=3600, allow_output_mutation=True, show_spinner=True, max_entries=2)
|
| 138 |
def load_docs():
|
| 139 |
# Processing DOCUMENTS
|
| 140 |
doc_set = {}
|
|
|
|
| 158 |
return list(doc_set.values())
|
| 159 |
|
| 160 |
|
| 161 |
+
@st.cache(ttl=3600, allow_output_mutation=True, show_spinner=True, max_entries=2)
|
| 162 |
def load_models():
|
| 163 |
with open(path + '/models/BM25_simple.pkl', 'rb') as file:
|
| 164 |
bm25_simple: BM25Simple = pickle.load(file)
|