Silence1412 commited on
Commit
d400d41
1 Parent(s): 3909231

Update Chat_with_pdf_LLM.py

Browse files
Files changed (1) hide show
  1. Chat_with_pdf_LLM.py +1 -2
Chat_with_pdf_LLM.py CHANGED
@@ -4,8 +4,6 @@ from langchain.text_splitter import CharacterTextSplitter
4
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
5
  from langchain.vectorstores import FAISS
6
  from langchain.chains.question_answering import load_qa_chain
7
- from langchain.llms import OpenAI
8
- from langchain.callbacks import get_openai_callback
9
  import os
10
  from streamlit_chat import message
11
  from langchain import HuggingFaceHub
@@ -30,6 +28,7 @@ def LLM_pdf(model_name = 'google/flan-t5-large'):
30
  chunk_overlap=200,
31
  length_function=len
32
  )
 
33
  chunks = text_splitter.split_text(text)
34
 
35
  # create embeddings
 
4
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
5
  from langchain.vectorstores import FAISS
6
  from langchain.chains.question_answering import load_qa_chain
 
 
7
  import os
8
  from streamlit_chat import message
9
  from langchain import HuggingFaceHub
 
28
  chunk_overlap=200,
29
  length_function=len
30
  )
31
+ print(text_splitter)
32
  chunks = text_splitter.split_text(text)
33
 
34
  # create embeddings