jybae commited on
Commit
72da32d
·
verified ·
1 Parent(s): 6d682b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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
- with open("index.pkl", "rb") as f:
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