aniudupa commited on
Commit
75e1f9d
1 Parent(s): 21405d8

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,12 +24,12 @@ embeddings = HuggingFaceEmbeddings(
24
  model_kwargs={"trust_remote_code": True, "revision": "289f532e14dbbbd5a04753fa58739e9ba766f3c7"},
25
  )
26
 
27
- index_path = Path("index.faiss")
28
  if not index_path.exists():
29
  raise FileNotFoundError("FAISS index not found. Please generate it and place it in 'ipc_vector_db'.")
30
 
31
  # Load the FAISS index
32
- db = FAISS.load_local("AI LAW CHATBOT", embeddings, allow_dangerous_deserialization=True)
33
  db_retriever = db.as_retriever(search_type="similarity", search_kwargs={"k": 4})
34
 
35
  # Define the prompt template for the legal chatbot
 
24
  model_kwargs={"trust_remote_code": True, "revision": "289f532e14dbbbd5a04753fa58739e9ba766f3c7"},
25
  )
26
 
27
+ index_path = Path("models/index.faiss")
28
  if not index_path.exists():
29
  raise FileNotFoundError("FAISS index not found. Please generate it and place it in 'ipc_vector_db'.")
30
 
31
  # Load the FAISS index
32
+ db = FAISS.load_local("models", embeddings, allow_dangerous_deserialization=True)
33
  db_retriever = db.as_retriever(search_type="similarity", search_kwargs={"k": 4})
34
 
35
  # Define the prompt template for the legal chatbot