mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-10 17:43:40 +08:00
18 lines
509 B
Python
18 lines
509 B
Python
import os
|
|
|
|
PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../"))
|
|
|
|
def get_data_dir():
|
|
data_path = os.path.join(PROJECT_ROOT, "data")
|
|
os.makedirs(data_path, exist_ok=True)
|
|
return data_path
|
|
|
|
def get_model_dir(subdir: str = "whisper") -> str:
|
|
base = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../models"))
|
|
path = os.path.join(base, subdir)
|
|
os.makedirs(path, exist_ok=True)
|
|
return path
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print(get_data_dir()) |