Spaces:
Runtime error
Runtime error
Changed caching decorator.
Browse files
app.py
CHANGED
@@ -6,17 +6,17 @@ import streamlit as st
|
|
6 |
from sentence_transformers import SentenceTransformer
|
7 |
|
8 |
|
9 |
-
@st.
|
10 |
def load_model():
|
11 |
return SentenceTransformer("TamedWicked/MathBERT_hr")
|
12 |
|
13 |
|
14 |
-
@st.
|
15 |
def load_knowledge_base_df():
|
16 |
return pd.read_parquet("data/knowledge_base.parquet")
|
17 |
|
18 |
|
19 |
-
@st.
|
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])
|