mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-26 22:30:44 +01:00
Allow users to write one flag per line in CMD_FLAGS.txt
This commit is contained in:
parent
9e17325207
commit
fa4a948b38
3
webui.py
3
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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user