mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 16:18:10 +08:00
safe output path in webui
Former-commit-id: 23f14262e0d54631630c084ba71e0433ea1d4640
This commit is contained in:
parent
d13b8bee8a
commit
fbe963a96a
@ -37,8 +37,9 @@ DEFAULT_SAVE_DIR = "saves"
|
|||||||
USER_CONFIG = "user_config.yaml"
|
USER_CONFIG = "user_config.yaml"
|
||||||
|
|
||||||
|
|
||||||
def get_save_dir(*args) -> os.PathLike:
|
def get_save_dir(*paths: str) -> os.PathLike:
|
||||||
return os.path.join(DEFAULT_SAVE_DIR, *args)
|
paths = (path.replace(os.path.sep, "").replace(" ", "").strip() for path in paths)
|
||||||
|
return os.path.join(DEFAULT_SAVE_DIR, *paths)
|
||||||
|
|
||||||
|
|
||||||
def get_config_path() -> os.PathLike:
|
def get_config_path() -> os.PathLike:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user