BroBro87 commited on
Commit
77364e4
β€’
1 Parent(s): 3a401a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -36,7 +36,12 @@ def configure_service_context(llm, embed_model):
36
 
37
  def initialize_vector_store_index(data_path, service_context):
38
  documents = SimpleDirectoryReader(data_path).load_data()
39
- return VectorStoreIndex.from_documents(documents, service_context=service_context)
 
 
 
 
 
40
 
41
  def main():
42
  st.title("Cloudflare RAG")
 
36
 
37
  def initialize_vector_store_index(data_path, service_context):
38
  documents = SimpleDirectoryReader(data_path).load_data()
39
+ import pickle
40
+
41
+ # Load the index from a file
42
+ with open('./index_file.pkl', 'rb') as f:
43
+ index = pickle.load(f)
44
+ return index
45
 
46
  def main():
47
  st.title("Cloudflare RAG")