batalovme commited on
Commit
0266a31
1 Parent(s): 5fb9a0f

Fix context

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -7,18 +7,13 @@ from loader import load_documents
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
-
18
- context = load_context()
19
-
20
  print("Loading documents and building index...")
21
- index = load_docs_and_build_index(context)
22
  print("Done!")
23
 
24
  query_engine = index.as_query_engine(streaming=True)
 
7
  st.title("SAIRA")
8
 
9
  @st.cache_resource
10
+ def load_docs_and_build_index():
11
+ context = build_service_context()
12
  docs = load_documents()
13
  return build_index(docs, context)
14
 
 
 
 
 
 
 
15
  print("Loading documents and building index...")
16
+ index = load_docs_and_build_index()
17
  print("Done!")
18
 
19
  query_engine = index.as_query_engine(streaming=True)