fix webui

This commit is contained in:
hiyouga
2023-08-12 23:52:07 +08:00
parent 9dc6a296e3
commit d69b1388e6
3 changed files with 3 additions and 5 deletions

View File

@@ -65,7 +65,7 @@ def can_quantize(finetuning_type: str) -> Dict[str, Any]:
def gen_cmd(args: Dict[str, Any]) -> str:
cmd_lines = ["CUDA_VISIBLE_DEVICES=0 python "]
for k, v in args.items():
if v is not None and v is not False and v != "":
if v is not None and v != "":
cmd_lines.append(" --{} {} ".format(k, str(v)))
cmd_text = "\\\n".join(cmd_lines)
cmd_text = "```bash\n{}\n```".format(cmd_text)