Spaces:
Sleeping
Sleeping
Update documentchat.py
Browse files- documentchat.py +1 -1
documentchat.py
CHANGED
|
@@ -53,7 +53,7 @@ def get_conversational_chain():
|
|
| 53 |
|
| 54 |
def user_input(user_question):
|
| 55 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 56 |
-
new_db = FAISS.load_local("faiss_index", embeddings)
|
| 57 |
docs = new_db.similarity_search(user_question)
|
| 58 |
chain = get_conversational_chain()
|
| 59 |
response = chain({"input_documents": docs, "question": user_question}, return_only_outputs=True)
|
|
|
|
| 53 |
|
| 54 |
def user_input(user_question):
|
| 55 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/embedding-001")
|
| 56 |
+
new_db = FAISS.load_local("faiss_index", embeddings,allow_dangerous_deserialization=True)
|
| 57 |
docs = new_db.similarity_search(user_question)
|
| 58 |
chain = get_conversational_chain()
|
| 59 |
response = chain({"input_documents": docs, "question": user_question}, return_only_outputs=True)
|