mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
feature: allow comments in CMD_FLAGS.txt (#127)
--------- Co-authored-by: missionfloyd <missionfloyd@users.noreply.github.com>
This commit is contained in:
parent
08e7ee4c4c
commit
7f0ea4dc16
@ -17,7 +17,7 @@ conda_env_path = os.path.join(script_dir, "installer_files", "env")
|
||||
cmd_flags_path = os.path.join(script_dir, "CMD_FLAGS.txt")
|
||||
if os.path.exists(cmd_flags_path):
|
||||
with open(cmd_flags_path, 'r') as f:
|
||||
CMD_FLAGS = ' '.join(line.strip() for line in f.read().splitlines() if line.strip())
|
||||
CMD_FLAGS = ' '.join(line.strip() for line in f if line.strip() and not line.strip().startswith('#'))
|
||||
else:
|
||||
CMD_FLAGS = ''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user