Spaces:
Runtime error
Runtime error
Commit
•
c19f439
1
Parent(s):
ff3a289
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
-
|
2 |
-
!git clone https://github.com/annikaijak/deeplearning_assignment_4
|
3 |
-
|
4 |
-
from langchain.document_loaders import PyPDFDirectoryLoader
|
5 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
6 |
from langchain.embeddings import HuggingFaceEmbeddings
|
7 |
from langchain.vectorstores import Chroma
|
@@ -16,7 +13,7 @@ import time
|
|
16 |
|
17 |
|
18 |
# Loading the PDF files from Google Files
|
19 |
-
loader =
|
20 |
docs = loader.load()
|
21 |
|
22 |
# Splitting the text in smaller chunks
|
|
|
1 |
+
from langchain.document_loaders import PyPDFLoader
|
|
|
|
|
|
|
2 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
3 |
from langchain.embeddings import HuggingFaceEmbeddings
|
4 |
from langchain.vectorstores import Chroma
|
|
|
13 |
|
14 |
|
15 |
# Loading the PDF files from Google Files
|
16 |
+
loader = PyPDFLoader("/content/deeplearning_assignment_4/data/PDF_Documents")
|
17 |
docs = loader.load()
|
18 |
|
19 |
# Splitting the text in smaller chunks
|