Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,8 @@ from langchain_community.vectorstores.faiss import FAISS
|
|
24 |
# with open('index.pickle', 'rb') as pkl:
|
25 |
# doc_embedding = pickle.load(pkl)
|
26 |
# db.save_local("faiss_index")
|
|
|
|
|
27 |
db=FAISS.load_local("faiss_index", embeddings,allow_dangerous_deserialization=True)
|
28 |
#-----------------------------------------------------------------------------
|
29 |
def get_response_from_query(db, query, k=3):
|
|
|
24 |
# with open('index.pickle', 'rb') as pkl:
|
25 |
# doc_embedding = pickle.load(pkl)
|
26 |
# db.save_local("faiss_index")
|
27 |
+
|
28 |
+
embeddings = OpenAIEmbeddings()
|
29 |
db=FAISS.load_local("faiss_index", embeddings,allow_dangerous_deserialization=True)
|
30 |
#-----------------------------------------------------------------------------
|
31 |
def get_response_from_query(db, query, k=3):
|