Update app.py
Browse files
app.py
CHANGED
|
@@ -9,6 +9,8 @@ hf = HuggingFaceInstructEmbeddings(
|
|
| 9 |
embed_instruction="Represent the document for retrieval: ",
|
| 10 |
query_instruction="Represent the query for retrieval: "
|
| 11 |
)
|
|
|
|
|
|
|
| 12 |
|
| 13 |
# Load and process the PDF files
|
| 14 |
loader = PyPDFLoader("./new_papers/ReACT.pdf")
|
|
|
|
| 9 |
embed_instruction="Represent the document for retrieval: ",
|
| 10 |
query_instruction="Represent the query for retrieval: "
|
| 11 |
)
|
| 12 |
+
# Add a padding token to the tokenizer
|
| 13 |
+
hf.tokenizer.add_special_tokens({'pad_token': '[PAD]'})
|
| 14 |
|
| 15 |
# Load and process the PDF files
|
| 16 |
loader = PyPDFLoader("./new_papers/ReACT.pdf")
|