calmgoose commited on
Commit
d270ee0
·
1 Parent(s): 55d5c83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -40,15 +40,17 @@ 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, BOOK_NAME)
51
  print(target_path)
 
 
52
 
53
  # load embedding model
54
  embeddings = HuggingFaceInstructEmbeddings(
 
40
  cache_dir=cache_dir,
41
  )
42
 
43
+ target_dir = 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
  print(target_path)
52
+ else:
53
+ print("no path found")
54
 
55
  # load embedding model
56
  embeddings = HuggingFaceInstructEmbeddings(