ZeeAI1 commited on
Commit
ea1cfc6
·
verified ·
1 Parent(s): d9ac2ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,7 +41,8 @@ def preprocess_pdfs(folder_path, save_vectorstore_path):
41
  @st.cache_resource
42
  def load_vector_store(save_vectorstore_path):
43
  embedding_function = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
44
- return FAISS.load_local(save_vectorstore_path, embedding_function)
 
45
 
46
 
47
  # Generate summary based on the retrieved text
@@ -84,4 +85,3 @@ if __name__ == "__main__":
84
  main()
85
 
86
 
87
-
 
41
  @st.cache_resource
42
  def load_vector_store(save_vectorstore_path):
43
  embedding_function = HuggingFaceEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2")
44
+ return FAISS.load_local(save_vectorstore_path, embedding_function, allow_dangerous_deserialization=True)
45
+
46
 
47
 
48
  # Generate summary based on the retrieved text
 
85
  main()
86
 
87