SexBot / utils /dir.py
Pew404's picture
Upload folder using huggingface_hub
318db6e verified
raw
history blame contribute delete
286 Bytes
import os
existing_indexs = []
for root, dirs, files in os.walk("/data1/home/purui/projects/chatbot/kb"):
for dir in dirs:
existing_indexs.append(os.path.join(root, dir))
# 退出循环,因为我们只想要第一层的目录
break
print(existing_indexs)