Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,8 +8,7 @@ from langchain_openai import OpenAIEmbeddings
|
|
| 8 |
from langchain_openai import ChatOpenAI
|
| 9 |
|
| 10 |
# Load the FAISS index from the .pkl file
|
| 11 |
-
|
| 12 |
-
db = faiss.read_index(f)
|
| 13 |
|
| 14 |
def get_response_from_query(db, query, k=3):
|
| 15 |
|
|
|
|
| 8 |
from langchain_openai import ChatOpenAI
|
| 9 |
|
| 10 |
# Load the FAISS index from the .pkl file
|
| 11 |
+
db = FAISS.load_local("faiss_index", embeddings,allow_dangerous_deserialization=True)
|
|
|
|
| 12 |
|
| 13 |
def get_response_from_query(db, query, k=3):
|
| 14 |
|