Spaces:
Sleeping
Sleeping
Update user_guide_sync.py
Browse files- user_guide_sync.py +6 -5
user_guide_sync.py
CHANGED
|
@@ -66,13 +66,14 @@ def get_base_links():
|
|
| 66 |
|
| 67 |
def update_user_guide():
|
| 68 |
get_base_links()
|
|
|
|
| 69 |
# try:
|
| 70 |
# storage_context = StorageContext.from_defaults(persist_dir="llama_index")
|
| 71 |
# index = load_index_from_storage(storage_context=storage_context)
|
| 72 |
# print("loaded")
|
| 73 |
# except:
|
| 74 |
-
documents = SimpleDirectoryReader("user_guide").load_data()
|
| 75 |
-
index = VectorStoreIndex.from_documents(documents)
|
| 76 |
-
index.storage_context.persist("llama_index")
|
| 77 |
-
print("index created")
|
| 78 |
-
return index
|
|
|
|
| 66 |
|
| 67 |
def update_user_guide():
|
| 68 |
get_base_links()
|
| 69 |
+
return "done"
|
| 70 |
# try:
|
| 71 |
# storage_context = StorageContext.from_defaults(persist_dir="llama_index")
|
| 72 |
# index = load_index_from_storage(storage_context=storage_context)
|
| 73 |
# print("loaded")
|
| 74 |
# except:
|
| 75 |
+
# documents = SimpleDirectoryReader("user_guide").load_data()
|
| 76 |
+
# index = VectorStoreIndex.from_documents(documents)
|
| 77 |
+
# index.storage_context.persist("llama_index")
|
| 78 |
+
# print("index created")
|
| 79 |
+
# return index
|