Spaces:
Sleeping
Sleeping
change promt
Browse files
app.py
CHANGED
@@ -180,7 +180,7 @@ def load_llama2_llamaCpp():
|
|
180 |
return llm
|
181 |
|
182 |
def set_custom_prompt():
|
183 |
-
custom_prompt_template = """ Use the following pieces of information to answer the user's question.
|
184 |
If you don't know the answer, don't try to make up an answer.
|
185 |
|
186 |
Context : {context}
|
@@ -240,6 +240,7 @@ def main():
|
|
240 |
text = ""
|
241 |
for page in pdf_reader.pages:
|
242 |
text += page.extract_text()
|
|
|
243 |
db = FAISS.from_texts(text, embeddings)
|
244 |
|
245 |
memory = ConversationBufferMemory(memory_key="chat_history",
|
|
|
180 |
return llm
|
181 |
|
182 |
def set_custom_prompt():
|
183 |
+
custom_prompt_template = """ Use the following pieces of information from context to answer the user's question.
|
184 |
If you don't know the answer, don't try to make up an answer.
|
185 |
|
186 |
Context : {context}
|
|
|
240 |
text = ""
|
241 |
for page in pdf_reader.pages:
|
242 |
text += page.extract_text()
|
243 |
+
print(text)
|
244 |
db = FAISS.from_texts(text, embeddings)
|
245 |
|
246 |
memory = ConversationBufferMemory(memory_key="chat_history",
|