Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError and model LLM location #4

Open
brinrbc opened this issue May 26, 2023 · 1 comment
Open

FileNotFoundError and model LLM location #4

brinrbc opened this issue May 26, 2023 · 1 comment

Comments

@brinrbc
Copy link

brinrbc commented May 26, 2023

Hi! thank you very much!
when I try to download a pdf, I get an error. can you please tell me what can be done here?

FileNotFoundError: [Errno 2] No such file or directory: 'WHERE YOUR PDFS ARE (SINGLE DIRECTORY)/Bruce_Bruce_2018_Practical Statistics for Data Scientists.pdf'
Traceback:
File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
    exec(code, module.__dict__)
File "/Users/user/GitHub/local_llama/local_llama.py", line 152, in <module>
    save_pdf(file.name)
File "/Users/user/GitHub/local_llama/local_llama.py", line 103, in save_pdf
    pdf_to_index(pdf_path=f'{PATH_TO_PDFS}/{file}', save_path=f'{PATH_TO_INDEXES}/{file}')
File "/Users/user/GitHub/local_llama/local_llama.py", line 69, in pdf_to_index
    documents = loader.load_data(file=Path(pdf_path))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/llama_index/readers/llamahub_modules/file/pdf/base.py", line 19, in load_data
    with open(file, "rb") as fp:
         ^^^^^^^^^^^^^^^^

and where to specify the path to the LLM model?

@brinrbc brinrbc changed the title model LLM location FileNotFoundError and model LLM location May 26, 2023
@jlonge4
Copy link
Owner

jlonge4 commented May 26, 2023

So you'll want to replace "where your PDFs are" with the absolute path to your documents. For example... "C://Users/You/Bruce_Bruce_2018_Practical Statistics for Data Scientists.pdf" @brinrbc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants