app.py
CHANGED
@@ -8,13 +8,13 @@ from langchain.memory import ConversationBufferMemory
|
|
8 |
from langchain.chains import RetrievalQA
|
9 |
from pdfminer.high_level import extract_text
|
10 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
11 |
-
from transformers import AutoTokenizer,
|
12 |
|
13 |
|
14 |
# Updated Prompt Template
|
15 |
|
16 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
17 |
-
model = AutoModelForCausalLM.from_pretrained("
|
18 |
|
19 |
persist_directory = 'db'
|
20 |
embeddings_model_name = 'sentence-transformers/all-MiniLM-L6-v2'
|
|
|
8 |
from langchain.chains import RetrievalQA
|
9 |
from pdfminer.high_level import extract_text
|
10 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
11 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
12 |
|
13 |
|
14 |
# Updated Prompt Template
|
15 |
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("TinyPixel/Llama-2-7B-bf16-sharded")
|
17 |
+
model = AutoModelForCausalLM.from_pretrained("TinyPixel/Llama-2-7B-bf16-sharded")
|
18 |
|
19 |
persist_directory = 'db'
|
20 |
embeddings_model_name = 'sentence-transformers/all-MiniLM-L6-v2'
|