From 967dda17a0cc760dccf0b61e359a471c29124b7c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:52:52 -0700 Subject: [PATCH] Remove OOBABOOGA_FLAGS --- webui.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/webui.py b/webui.py index 60484e4..3aa4a3e 100644 --- a/webui.py +++ b/webui.py @@ -14,18 +14,12 @@ conda_env_path = os.path.join(script_dir, "installer_files", "env") # os.environ["HCC_AMDGPU_TARGET"] = 'gfx1030' # Command-line flags -if "OOBABOOGA_FLAGS" in os.environ: - CMD_FLAGS = os.environ["OOBABOOGA_FLAGS"] - print("The following flags have been taken from the environment variable 'OOBABOOGA_FLAGS':") - print(CMD_FLAGS) - print("To use the CMD_FLAGS Inside webui.py, unset 'OOBABOOGA_FLAGS'.\n") +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()) else: - 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()) - else: - CMD_FLAGS = '' + CMD_FLAGS = '' def is_linux():