HeRksTAn commited on
Commit
e3d290e
1 Parent(s): 66ba2ef

experiment with other loader due to warning errors

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,7 +2,8 @@ import chainlit as cl
2
  import tiktoken
3
  import os
4
  from dotenv import load_dotenv
5
- from langchain_community.document_loaders import PyMuPDFLoader
 
6
  from langchain_openai import OpenAIEmbeddings
7
  from langchain_core.prompts import ChatPromptTemplate
8
  from langchain.text_splitter import RecursiveCharacterTextSplitter
@@ -44,7 +45,8 @@ def tiktoken_len(text):
44
  )
45
  return len(tokens)
46
 
47
- car_manual = PyMuPDFLoader(os.environ.get('pdfurl'))
 
48
 
49
  car_manual_data = car_manual.load()
50
 
 
2
  import tiktoken
3
  import os
4
  from dotenv import load_dotenv
5
+ # from langchain_community.document_loaders import PyMuPDFLoader
6
+ from langchain_community.document_loaders import PyPDFLoader
7
  from langchain_openai import OpenAIEmbeddings
8
  from langchain_core.prompts import ChatPromptTemplate
9
  from langchain.text_splitter import RecursiveCharacterTextSplitter
 
45
  )
46
  return len(tokens)
47
 
48
+ # car_manual = PyMuPDFLoader(os.environ.get('pdfurl'))
49
+ car_manual = PyPDFLoader(os.environ.get('pdfurl'))
50
 
51
  car_manual_data = car_manual.load()
52