Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,7 @@ def save_chat_to_dataset(user_message, bot_message):
|
|
51 |
def process_pdf_with_langchain(pdf_path):
|
52 |
"""Process a PDF file and create a FAISS retriever."""
|
53 |
try:
|
54 |
-
|
55 |
-
loader = PyPDFLoader(pdf_path)
|
56 |
documents = loader.load()
|
57 |
|
58 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=50)
|
|
|
51 |
def process_pdf_with_langchain(pdf_path):
|
52 |
"""Process a PDF file and create a FAISS retriever."""
|
53 |
try:
|
54 |
+
loader = PyPDFLoader(pdf_path) # Fixed indentation
|
|
|
55 |
documents = loader.load()
|
56 |
|
57 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=500, chunk_overlap=50)
|