getGO007 commited on
Commit
1d39854
Β·
verified Β·
1 Parent(s): ffcda69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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