Created
December 13, 2023 04:16
-
-
Save idontcalculate/a63584c3d91e08bc12fcdf85c039f876 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import llama_index | |
from llama_index.tools import QueryEngineTool, ToolMetadata | |
from llama_index import ( | |
SimpleDirectoryReader, | |
VectorStoreIndex, | |
StorageContext, | |
load_index_from_storage, | |
) | |
try: | |
storage_context = StorageContext.from_defaults( | |
persist_dir="/content/storage/tesla" | |
) | |
tesla_index = load_index_from_storage(storage_context) | |
storage_context = StorageContext.from_defaults( | |
persist_dir="/content/storage/webtext" | |
) | |
webtext_index = load_index_from_storage(storage_context) | |
index_loaded = True | |
except: | |
index_loaded = False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment