jlonge4 / local_llama

This repo is to showcase how you can run a model locally and offline, free of OpenAI dependencies.
Apache License 2.0
240 stars 39 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/../GPT_INDEXES/None/docstore.json' #11

Open abhinandan1602 opened 1 year ago

abhinandan1602 commented 1 year ago

Whenever I submit a prompt after attaching a pdf file I get this error

FileNotFoundError: [Errno 2] No such file or directory: 'C:/Users/avashish/GPT_INDEXES/None/docstore.json' Traceback: File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script exec(code, module.dict) File "C:\Users\avashish\local_llama2.py", line 143, in query_index(query_u=user_input) File "C:\Users\avashish\local_llama2.py", line 86, in query_index storage_context = StorageContext.from_defaults(persist_dir=f"{PATH_TO_INDEXES}/{pdf_to_use}") File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\llama_index\storage\storage_context.py", line 75, in from_defaults docstore = docstore or SimpleDocumentStore.from_persist_dir( File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\llama_index\storage\docstore\simple_docstore.py", line 57, in from_persist_dir return cls.from_persist_path(persist_path, namespace=namespace, fs=fs) File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\llama_index\storage\docstore\simple_docstore.py", line 75, in from_persist_path simple_kvstore = SimpleKVStore.from_persist_path(persist_path, fs=fs) File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\llama_index\storage\kvstore\simple_kvstore.py", line 75, in from_persist_path with fs.open(persist_path, "rb") as f: File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\fsspec\spec.py", line 1241, in open f = self._open( File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\fsspec\implementations\local.py", line 184, in _open return LocalFileOpener(path, mode, fs=self, **kwargs) File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\fsspec\implementations\local.py", line 315, in init self._open() File "C:\Users\avashish\AppData\Local\anaconda3\lib\site-packages\fsspec\implementations\local.py", line 320, in _open self.f = open(self.path, mode=self.mode)