Spaces:
Paused
Paused
Ashvanth.S
commited on
Commit
·
65d74a7
1
Parent(s):
74f7645
Update changes
Browse files- requirements.txt +3 -1
- utils/document_loader.py +3 -7
requirements.txt
CHANGED
@@ -6,4 +6,6 @@ langchain-chroma
|
|
6 |
gradio
|
7 |
openai
|
8 |
pydantic
|
9 |
-
duckduckgo-search
|
|
|
|
|
|
6 |
gradio
|
7 |
openai
|
8 |
pydantic
|
9 |
+
duckduckgo-search
|
10 |
+
python-dotenv
|
11 |
+
pdfplumber
|
utils/document_loader.py
CHANGED
@@ -1,13 +1,9 @@
|
|
1 |
import os
|
2 |
from langchain_community.document_loaders import PDFPlumberLoader
|
3 |
|
4 |
-
def load_pdf(
|
5 |
-
|
6 |
-
|
7 |
-
file_path = os.path.join(directory,file)
|
8 |
-
loader = PDFPlumberLoader(file_path)
|
9 |
-
document = loader.load()
|
10 |
-
|
11 |
return document
|
12 |
|
13 |
def create_unique_ids(documents):
|
|
|
1 |
import os
|
2 |
from langchain_community.document_loaders import PDFPlumberLoader
|
3 |
|
4 |
+
def load_pdf(file_path):
|
5 |
+
loader = PDFPlumberLoader(file_path)
|
6 |
+
document = loader.load()
|
|
|
|
|
|
|
|
|
7 |
return document
|
8 |
|
9 |
def create_unique_ids(documents):
|