Spaces:
Paused
Paused
Shreyas094
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,9 @@ from langchain_community.embeddings import HuggingFaceEmbeddings
|
|
12 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
13 |
from langchain_community.llms import HuggingFaceHub
|
14 |
from langchain_core.runnables import RunnableParallel, RunnablePassthrough
|
15 |
-
from langchain_core.
|
16 |
huggingface_token = os.environ.get("HUGGINGFACE_TOKEN")
|
|
|
17 |
def load_and_split_document_basic(file):
|
18 |
"""Loads and splits the document into pages."""
|
19 |
loader = PyPDFLoader(file.name)
|
|
|
12 |
from langchain_text_splitters import RecursiveCharacterTextSplitter
|
13 |
from langchain_community.llms import HuggingFaceHub
|
14 |
from langchain_core.runnables import RunnableParallel, RunnablePassthrough
|
15 |
+
from langchain_core.documents import Document
|
16 |
huggingface_token = os.environ.get("HUGGINGFACE_TOKEN")
|
17 |
+
|
18 |
def load_and_split_document_basic(file):
|
19 |
"""Loads and splits the document into pages."""
|
20 |
loader = PyPDFLoader(file.name)
|