Add a "CMD_FLAGS" variable

This commit is contained in:
oobabooga 2023-05-10 17:54:12 -03:00 committed by GitHub
parent b8cfc20e58
commit d7d3f7f31c
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,9 @@ import sys
script_dir = os.getcwd() script_dir = os.getcwd()
# Use this to set your command-line flags. For the full list, see:
# https://github.com/oobabooga/text-generation-webui/#starting-the-web-ui
CMD_FLAGS = '--chat --model-menu'
def run_cmd(cmd, assert_success=False, environment=False, capture_output=False, env=None): def run_cmd(cmd, assert_success=False, environment=False, capture_output=False, env=None):
# Use the conda environment # Use the conda environment
@ -164,7 +167,7 @@ def download_model():
def run_model(): def run_model():
os.chdir("text-generation-webui") os.chdir("text-generation-webui")
run_cmd("python server.py --chat --model-menu", environment=True) # put your flags here! run_cmd(f"python server.py {CMD_FLAGS}", environment=True) # put your flags here!
if __name__ == "__main__": if __name__ == "__main__":