matijap commited on
Commit
e7197be
1 Parent(s): d5146d1

Changed caching decorator.

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,17 +6,17 @@ import streamlit as st
6
  from sentence_transformers import SentenceTransformer
7
 
8
 
9
- @st.cache_data
10
  def load_model():
11
  return SentenceTransformer("TamedWicked/MathBERT_hr")
12
 
13
 
14
- @st.cache_data
15
  def load_knowledge_base_df():
16
  return pd.read_parquet("data/knowledge_base.parquet")
17
 
18
 
19
- @st.cache_data
20
  def load_knowledge_base_index():
21
  embeddings = joblib.load("data/knowledge_base_embeddings.pkl")
22
  index = faiss.IndexFlatL2(embeddings.shape[1])
 
6
  from sentence_transformers import SentenceTransformer
7
 
8
 
9
+ @st.experimental_memo
10
  def load_model():
11
  return SentenceTransformer("TamedWicked/MathBERT_hr")
12
 
13
 
14
+ @st.experimental_memo
15
  def load_knowledge_base_df():
16
  return pd.read_parquet("data/knowledge_base.parquet")
17
 
18
 
19
+ @st.experimental_memo
20
  def load_knowledge_base_index():
21
  embeddings = joblib.load("data/knowledge_base_embeddings.pkl")
22
  index = faiss.IndexFlatL2(embeddings.shape[1])