zylon-ai / private-gpt

Interact with your documents using the power of GPT, 100% privately, no data leaks
https://privategpt.dev
Apache License 2.0
53.88k stars 7.24k forks source link

make ingest raises folder does not exist-unable to do bulk ingest #1115

Closed aminbaig closed 11 months ago

aminbaig commented 11 months ago

I am using the following command to bulk ingest pdf files:

make ingest c:\ai\privateGPT\Extracted

The folder named extracted has all the pdf files in it

When I run the above command I get the following error:

Traceback (most recent call last):
  File "C:\AI\privateGPT\scripts\ingest_folder.py", line 39, in <module>
    raise ValueError(f"Path {args.folder} does not exist")
ValueError: Path `arg=c:\ai\privateGPT\Extracted does not exist
make: *** [Makefile:52: ingest] Error 1

@imartinez I am using windows 11 terminal, python 3.11.0. I am able to run gradio interface and privateGPT, I can also add single files from the web interface but the ingest command is driving me crazy.

Can someone please advise on whats wrong, is the ingest_folder broken or is it me???

namp commented 11 months ago

python scripts/ingest_folder.py FOLDERPATH

aminbaig commented 11 months ago

The above suggestion gives me the following error @namp

C:\AI\privateGPT>python scripts/ingest_folder.py Extracted
Traceback (most recent call last):
  File "C:\AI\privateGPT\scripts\ingest_folder.py", line 5, in <module>
    from private_gpt.di import root_injector
ModuleNotFoundError: No module named 'private_gpt'

The folder is right there image

namp commented 11 months ago

privateGPT is not installed. Follow the installation guide in the docs

aminbaig commented 11 months ago

privateGPT is installed. I can run it using

poetry run python -m private_gpt

I can also ingest signle documents using the gradio interface @namp

aminbaig commented 11 months ago

I was able to run the bulk ingest using:

poetry run python scripts/ingest_folder.py Extracted