mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-15 16:18:10 +08:00
Update utils.py
In windows mutiline command should like command --arg1 xxx ` --arg2 xxx ` Former-commit-id: b189750520af1fccd0485052792eda269692df89
This commit is contained in:
parent
0d6ec70c6f
commit
2935c4cddb
@ -113,7 +113,10 @@ def gen_cmd(args: Dict[str, Any]) -> str:
|
|||||||
for k, v in clean_cmd(args).items():
|
for k, v in clean_cmd(args).items():
|
||||||
cmd_lines.append(" --{} {} ".format(k, str(v)))
|
cmd_lines.append(" --{} {} ".format(k, str(v)))
|
||||||
|
|
||||||
cmd_text = "\\\n".join(cmd_lines)
|
if os.name == "nt":
|
||||||
|
cmd_text = "`\n".join(cmd_lines)
|
||||||
|
else:
|
||||||
|
cmd_text = "\\\n".join(cmd_lines)
|
||||||
cmd_text = "```bash\n{}\n```".format(cmd_text)
|
cmd_text = "```bash\n{}\n```".format(cmd_text)
|
||||||
return cmd_text
|
return cmd_text
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user