Update app.py
Browse files
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"
|
34 |
if not os.path.exists(index_path):
|
35 |
-
st.
|
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)
|