mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-22 22:02:51 +08:00
safe output path in webui
Former-commit-id: 3c2a992caa45c9121cd1ccac3de9bbcf1a9b058b
This commit is contained in:
parent
7130efff54
commit
02f716907e
@ -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