Spaces:
Sleeping
Sleeping
Add cache
Browse files
app.py
CHANGED
@@ -6,10 +6,12 @@ from loader import load_documents
|
|
6 |
|
7 |
st.title("SAIRA")
|
8 |
|
|
|
9 |
def load_docs_and_build_index(context):
|
10 |
docs = load_documents()
|
11 |
return build_index(docs, context)
|
12 |
|
|
|
13 |
def load_context():
|
14 |
return build_service_context()
|
15 |
|
|
|
6 |
|
7 |
st.title("SAIRA")
|
8 |
|
9 |
+
@st.cache_resource
|
10 |
def load_docs_and_build_index(context):
|
11 |
docs = load_documents()
|
12 |
return build_index(docs, context)
|
13 |
|
14 |
+
@st.cache_resource
|
15 |
def load_context():
|
16 |
return build_service_context()
|
17 |
|