Update app.py
Browse files
app.py
CHANGED
@@ -56,6 +56,7 @@ st.title("π Chat with Your PDF")
|
|
56 |
|
57 |
# 1) Ingest once or load existing index via index_store.json
|
58 |
if "index_ready" not in st.session_state:
|
|
|
59 |
index_meta = os.path.join(INDEX_DIR, "index_store.json")
|
60 |
if os.path.isfile(index_meta):
|
61 |
# Found LlamaIndex metadata β reuse existing index
|
|
|
56 |
|
57 |
# 1) Ingest once or load existing index via index_store.json
|
58 |
if "index_ready" not in st.session_state:
|
59 |
+
os.makedirs(INDEX_DIR, exist_ok=True) # ensure folder exists
|
60 |
index_meta = os.path.join(INDEX_DIR, "index_store.json")
|
61 |
if os.path.isfile(index_meta):
|
62 |
# Found LlamaIndex metadata β reuse existing index
|