Update app.py
Browse files
app.py
CHANGED
|
@@ -40,15 +40,17 @@ def load_vectorstore():
|
|
| 40 |
cache_dir=cache_dir,
|
| 41 |
)
|
| 42 |
|
| 43 |
-
|
| 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,
|
| 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(
|