Spaces:
Runtime error
Runtime error
sanjeevl10
commited on
Commit
•
387f307
1
Parent(s):
da96b6d
removed unused versions, cleaned up Docker file
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from operator import itemgetter
|
|
5 |
from langchain_huggingface import HuggingFaceEndpoint
|
6 |
from langchain_community.document_loaders import TextLoader
|
7 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
8 |
-
from langchain.document_loaders import
|
9 |
from langchain_huggingface import HuggingFaceEndpointEmbeddings
|
10 |
from langchain_core.prompts import PromptTemplate
|
11 |
from langchain.schema.runnable.config import RunnableConfig
|
@@ -38,7 +38,7 @@ HF_TOKEN = os.environ["HF_TOKEN"]
|
|
38 |
4. Index Files if they do not exist, otherwise load the vectorstore
|
39 |
"""
|
40 |
#Load the Pdf Documents from airbnb-10k
|
41 |
-
documents =
|
42 |
|
43 |
### 2. CREATE TEXT SPLITTER AND SPLIT DOCUMENTS
|
44 |
text_splitter = RecursiveCharacterTextSplitter(
|
|
|
5 |
from langchain_huggingface import HuggingFaceEndpoint
|
6 |
from langchain_community.document_loaders import TextLoader
|
7 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
8 |
+
from langchain.document_loaders import PyMuPDFLoader
|
9 |
from langchain_huggingface import HuggingFaceEndpointEmbeddings
|
10 |
from langchain_core.prompts import PromptTemplate
|
11 |
from langchain.schema.runnable.config import RunnableConfig
|
|
|
38 |
4. Index Files if they do not exist, otherwise load the vectorstore
|
39 |
"""
|
40 |
#Load the Pdf Documents from airbnb-10k
|
41 |
+
documents = PyMuPDFLoader("data/airbnb-10k.pdf").load()
|
42 |
|
43 |
### 2. CREATE TEXT SPLITTER AND SPLIT DOCUMENTS
|
44 |
text_splitter = RecursiveCharacterTextSplitter(
|