Arafath10 commited on
Commit
6337586
·
verified ·
1 Parent(s): 32cd183

Update user_guide_sync.py

Browse files
Files changed (1) hide show
  1. user_guide_sync.py +5 -6
user_guide_sync.py CHANGED
@@ -69,14 +69,13 @@ def get_base_links():
69
 
70
  def update_user_guide():
71
  get_base_links()
72
- return "done"
73
  # try:
74
  # storage_context = StorageContext.from_defaults(persist_dir="llama_index")
75
  # index = load_index_from_storage(storage_context=storage_context)
76
  # print("loaded")
77
  # except:
78
- # documents = SimpleDirectoryReader("user_guide").load_data()
79
- # index = VectorStoreIndex.from_documents(documents)
80
- # index.storage_context.persist("llama_index")
81
- # print("index created")
82
- # return index
 
69
 
70
  def update_user_guide():
71
  get_base_links()
 
72
  # try:
73
  # storage_context = StorageContext.from_defaults(persist_dir="llama_index")
74
  # index = load_index_from_storage(storage_context=storage_context)
75
  # print("loaded")
76
  # except:
77
+ documents = SimpleDirectoryReader("user_guide").load_data()
78
+ index = VectorStoreIndex.from_documents(documents)
79
+ index.storage_context.persist("llama_index")
80
+ print("index created")
81
+ return index