AIAnytime / AIAnytime/Search-Your-PDF-App

Only last pdf is getting ingested into the database

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
62
Fork
44
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

There is a small inaccuracy in ingest.py where documents are not loaded into the variable and the variable does not include the fact that the documents will be a list type rather than a single document.

`documents = []
for root, dirs, files in os.walk("docs"):
for file in files:
if file.endswith(".pdf"):
loader = PyPDFLoader(os.path.join(root, file))
documents.extend(loader.load())
print(file)`
The above code is a fix for the issue

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.