From fa4a948b387c9a286398df6e1a16b4a8a32b2aa5 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Wed, 9 Aug 2023 01:58:23 -0300 Subject: [PATCH] Allow users to write one flag per line in CMD_FLAGS.txt --- webui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webui.py b/webui.py index 508436c0..bf2c241a 100644 --- a/webui.py +++ b/webui.py @@ -18,7 +18,8 @@ if "OOBABOOGA_FLAGS" in os.environ: else: cmd_flags_path = os.path.join(script_dir, "CMD_FLAGS.txt") if os.path.exists(cmd_flags_path): - CMD_FLAGS = open(cmd_flags_path, 'r').read().strip() + with open(cmd_flags_path, 'r') as f: + CMD_FLAGS = ' '.join(line.strip() for line in f.read().splitlines() if line.strip()) else: CMD_FLAGS = '--chat'