uyen13 commited on
Commit
79c6855
·
1 Parent(s): 6323310

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -76,14 +76,14 @@ embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-
76
 
77
  # Create a FAISS vector store and save embeddings
78
  db = FAISS.from_documents(data, embeddings)
79
- # db.save_local(DB_FAISS_PATH)
80
-
81
 
 
82
  # Load the language model
83
  llm = load_llm()
84
 
85
  # Create a conversational chain
86
- chain = ConversationalRetrievalChain.from_llm(llm=llm, retriever=db.as_retriever())
87
 
88
  # Function for conversational chat
89
  def conversational_chat(query):
 
76
 
77
  # Create a FAISS vector store and save embeddings
78
  db = FAISS.from_documents(data, embeddings)
79
+ db.save_local(DB_FAISS_PATH)
 
80
 
81
+ db1 = db.load_local(DB_FAISS_PATH,embeddings)
82
  # Load the language model
83
  llm = load_llm()
84
 
85
  # Create a conversational chain
86
+ chain = ConversationalRetrievalChain.from_llm(llm=llm, retriever=db1.as_retriever())
87
 
88
  # Function for conversational chat
89
  def conversational_chat(query):