Update app.py
Browse files
app.py
CHANGED
@@ -31,10 +31,12 @@ def load_doc():
|
|
31 |
path="pdfs"
|
32 |
loaders = []
|
33 |
for file in os.listdir(path):
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
|
39 |
pages = []
|
40 |
for loader in loaders:
|
|
|
31 |
path="pdfs"
|
32 |
loaders = []
|
33 |
for file in os.listdir(path):
|
34 |
+
file_path = os.path.abspath(os.path.join(path, file))
|
35 |
+
print(f"Processing file: {file_path}")
|
36 |
+
|
37 |
+
if os.path.isfile(file_path):
|
38 |
+
loader = PyMuPDFLoader(file_path)
|
39 |
+
loaders.append(loader)
|
40 |
|
41 |
pages = []
|
42 |
for loader in loaders:
|