sahanes commited on
Commit
32e6d56
1 Parent(s): 8f54b67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ HF_TOKEN = os.environ["HF_TOKEN"]
34
  # added for Docker purposes compared to run chainlit app
35
  DATA_DIR = "./data"
36
  VECTORSTORE_DIR = os.path.join(DATA_DIR, "vectorstore")
37
- # VECTORSTORE_PATH = os.path.join(VECTORSTORE_DIR, "index.faiss")
38
 
39
 
40
  # -- RETRIEVAL -- #
@@ -94,7 +94,7 @@ hf_embeddings = HuggingFaceEndpointEmbeddings(
94
  huggingfacehub_api_token=os.environ["HF_TOKEN"],
95
  )
96
  ## Prevent re-indexing if vectorstores already exists
97
- if os.path.exists(VECTORSTORE_DIR):
98
  vectorstore = FAISS.load_local(
99
  VECTORSTORE_DIR,#"./data/vectorstore",
100
  hf_embeddings,
 
34
  # added for Docker purposes compared to run chainlit app
35
  DATA_DIR = "./data"
36
  VECTORSTORE_DIR = os.path.join(DATA_DIR, "vectorstore")
37
+ VECTORSTORE_PATH = os.path.join(VECTORSTORE_DIR, "index.faiss")
38
 
39
 
40
  # -- RETRIEVAL -- #
 
94
  huggingfacehub_api_token=os.environ["HF_TOKEN"],
95
  )
96
  ## Prevent re-indexing if vectorstores already exists
97
+ if os.path.exists(VECTORSTORE_PATH):
98
  vectorstore = FAISS.load_local(
99
  VECTORSTORE_DIR,#"./data/vectorstore",
100
  hf_embeddings,