danicafisher commited on
Commit
41c996e
1 Parent(s): d6dc547

Adds PyPDFLoader

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -8,6 +8,7 @@ from langchain_core.caches import InMemoryCache
8
  from operator import itemgetter
9
  from langchain_core.runnables.passthrough import RunnablePassthrough
10
  from langchain_qdrant import QdrantVectorStore, Qdrant
 
11
  import uuid
12
  import chainlit as cl
13
  import os
@@ -86,7 +87,7 @@ async def on_chat_start():
86
 
87
  # Load the style guide from the local file system
88
  style_guide_path = "./public/CoExperiences Writing Style Guide V1 (2024).pdf"
89
- loader = PyPDFLoader(style_guide_path)
90
  style_guide_docs = loader.load()
91
  style_guide_text = "\n".join([doc.page_content for doc in style_guide_docs])
92
 
 
8
  from operator import itemgetter
9
  from langchain_core.runnables.passthrough import RunnablePassthrough
10
  from langchain_qdrant import QdrantVectorStore, Qdrant
11
+ from langchain_community.document_loaders import PyMuPDFLoader
12
  import uuid
13
  import chainlit as cl
14
  import os
 
87
 
88
  # Load the style guide from the local file system
89
  style_guide_path = "./public/CoExperiences Writing Style Guide V1 (2024).pdf"
90
+ loader = PyMuPDFLoader(style_guide_path)
91
  style_guide_docs = loader.load()
92
  style_guide_text = "\n".join([doc.page_content for doc in style_guide_docs])
93