Spaces:
Sleeping
Sleeping
Update pdfchatbot.py
Browse files- pdfchatbot.py +2 -2
pdfchatbot.py
CHANGED
|
@@ -7,7 +7,7 @@ from langchain.embeddings import HuggingFaceEmbeddings
|
|
| 7 |
from langchain.vectorstores import Chroma
|
| 8 |
from langchain.llms import HuggingFacePipeline
|
| 9 |
from langchain.chains import ConversationalRetrievalChain
|
| 10 |
-
from langchain.document_loaders import PyPDFLoader
|
| 11 |
from langchain.prompts import PromptTemplate
|
| 12 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 13 |
|
|
@@ -17,7 +17,7 @@ class PDFChatBot:
|
|
| 17 |
Initialize the PDFChatBot instance.
|
| 18 |
|
| 19 |
Parameters:
|
| 20 |
-
config_path (str): Path to the configuration file (default is "
|
| 21 |
"""
|
| 22 |
self.processed = False
|
| 23 |
self.page = 0
|
|
|
|
| 7 |
from langchain.vectorstores import Chroma
|
| 8 |
from langchain.llms import HuggingFacePipeline
|
| 9 |
from langchain.chains import ConversationalRetrievalChain
|
| 10 |
+
from langchain.document_loaders import PyPDFLoader
|
| 11 |
from langchain.prompts import PromptTemplate
|
| 12 |
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 13 |
|
|
|
|
| 17 |
Initialize the PDFChatBot instance.
|
| 18 |
|
| 19 |
Parameters:
|
| 20 |
+
config_path (str): Path to the configuration file (default is "./config.yaml").
|
| 21 |
"""
|
| 22 |
self.processed = False
|
| 23 |
self.page = 0
|