leofan commited on
Commit
f443e49
1 Parent(s): 1751583

Update app/server.py

Browse files

Re-enable dangerous serialization.

Files changed (1) hide show
  1. app/server.py +1 -1
app/server.py CHANGED
@@ -23,7 +23,7 @@ hf_llm = HuggingFaceHub(
23
  embedding_model_id = 'WhereIsAI/UAE-Large-V1'
24
  embeddings_model = HuggingFaceEmbeddings(model_name=embedding_model_id)
25
 
26
- faiss_index = FAISS.load_local("langserve_index", embeddings_model)
27
  retriever = faiss_index.as_retriever()
28
  # retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
29
 
 
23
  embedding_model_id = 'WhereIsAI/UAE-Large-V1'
24
  embeddings_model = HuggingFaceEmbeddings(model_name=embedding_model_id)
25
 
26
+ faiss_index = FAISS.load_local("langserve_index", embeddings_model, allow_dangerous_deserialization=True)
27
  retriever = faiss_index.as_retriever()
28
  # retriever = faiss_index.as_retriever(search_kwargs={"k": 2})
29