mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-24 13:28:59 +01:00
Adds functionality for user to set flags via environment variable (#59)
This commit is contained in:
parent
5405635305
commit
97bc7e3fb6
8
webui.py
8
webui.py
@ -14,6 +14,14 @@ conda_env_path = os.path.join(script_dir, "installer_files", "env")
|
||||
CMD_FLAGS = '--chat --model-menu'
|
||||
|
||||
|
||||
# Allows users to set flags in "OOBABOOGA_FLAGS" environment variable
|
||||
if "OOBABOOGA_FLAGS" in os.environ:
|
||||
CMD_FLAGS = os.environ["OOBABOOGA_FLAGS"]
|
||||
print("\33[1;32mFlags have been taken from enivroment Variable 'OOBABOOGA_FLAGS'\33[0m")
|
||||
print(CMD_FLAGS)
|
||||
print("\33[1;32mTo use flags from webui.py remove 'OOBABOOGA_FLAGS'\33[0m")
|
||||
|
||||
|
||||
def run_cmd(cmd, assert_success=False, environment=False, capture_output=False, env=None):
|
||||
# Use the conda environment
|
||||
if environment:
|
||||
|
Loading…
Reference in New Issue
Block a user