calmgoose commited on
Commit
f4c417a
·
1 Parent(s): eefd868

fix: used wrong target directory to check for cached download

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,14 +40,14 @@ def load_vectorstore():
40
  cache_dir=cache_dir,
41
  )
42
 
43
- target_dir = f"books/{BOOK_NAME}"
44
 
45
  # Walk through the directory tree recursively
46
  for root, dirs, files in os.walk(cache_dir):
47
  # Check if the target directory is in the list of directories
48
  if target_dir in dirs:
49
  # Get the full path of the target directory
50
- target_path = os.path.join(root, target_dir)
51
 
52
  # load embedding model
53
  embeddings = HuggingFaceInstructEmbeddings(
 
40
  cache_dir=cache_dir,
41
  )
42
 
43
+ # target_dir = f"books/{BOOK_NAME}"
44
 
45
  # Walk through the directory tree recursively
46
  for root, dirs, files in os.walk(cache_dir):
47
  # Check if the target directory is in the list of directories
48
  if target_dir in dirs:
49
  # Get the full path of the target directory
50
+ target_path = os.path.join(root, BOOK_NAME)
51
 
52
  # load embedding model
53
  embeddings = HuggingFaceInstructEmbeddings(