Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -81,7 +81,7 @@ def user_input(user_question):
|
|
| 81 |
try:
|
| 82 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
|
| 83 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|
| 84 |
-
docs = new_db.similarity_search(user_question, k=
|
| 85 |
chain = get_conversational_chain()
|
| 86 |
response = chain({"input_documents": docs, "question": user_question}, return_only_outputs=True)
|
| 87 |
return response
|
|
|
|
| 81 |
try:
|
| 82 |
embeddings = GoogleGenerativeAIEmbeddings(model="models/text-embedding-004")
|
| 83 |
new_db = FAISS.load_local("faiss_index", embeddings, allow_dangerous_deserialization=True)
|
| 84 |
+
docs = new_db.similarity_search(user_question, k=8)
|
| 85 |
chain = get_conversational_chain()
|
| 86 |
response = chain({"input_documents": docs, "question": user_question}, return_only_outputs=True)
|
| 87 |
return response
|