未验证 提交 81133d41 编写于 作者: F Faber 提交者: GitHub

allow loading embeddings from subdirectories

上级 310b71f6
......@@ -149,9 +149,10 @@ class EmbeddingDatabase:
else:
self.skipped_embeddings[name] = embedding
for fn in os.listdir(self.embeddings_dir):
for root, dirs, fns in os.walk(self.embeddings_dir):
for fn in fns:
try:
fullfn = os.path.join(self.embeddings_dir, fn)
fullfn = os.path.join(root, fn)
if os.stat(fullfn).st_size == 0:
continue
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册