jarif commited on
Commit
b5d8569
·
verified ·
1 Parent(s): 8b99414

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,10 +30,10 @@ def load_llm():
30
  return HuggingFacePipeline(pipeline=pipe)
31
 
32
  def load_faiss_index():
33
- index_path = "faiss_index/index.faiss" # Update path to match the created index
34
  if not os.path.exists(index_path):
35
- st.warning("FAISS index not found. Please create the index first.")
36
- raise RuntimeError("FAISS index not found.")
37
 
38
  try:
39
  faiss_index = faiss.read_index(index_path)
 
30
  return HuggingFacePipeline(pipeline=pipe)
31
 
32
  def load_faiss_index():
33
+ index_path = "faiss_index/index.faiss"
34
  if not os.path.exists(index_path):
35
+ st.error(f"FAISS index not found at {index_path}. Please ensure the file exists.")
36
+ raise RuntimeError(f"FAISS index not found at {index_path}.")
37
 
38
  try:
39
  faiss_index = faiss.read_index(index_path)