Make "Show controls" customizable through settings.yaml

This commit is contained in:
oobabooga 2023-08-16 07:03:53 -07:00
parent 2a29208224
commit 73d9befb65
7 changed files with 10 additions and 7 deletions

View file

@ -178,7 +178,7 @@ def apply_interface_values(state, use_persistent=False):
return [state[k] if k in state else gr.update() for k in elements]
def save_settings(state, preset, instruction_template, extensions):
def save_settings(state, preset, instruction_template, extensions, show_controls):
output = copy.deepcopy(shared.settings)
exclude = ['name1', 'name2', 'greeting', 'context', 'turn_template']
for k in state:
@ -192,6 +192,7 @@ def save_settings(state, preset, instruction_template, extensions):
output['instruction_template'] = instruction_template
output['default_extensions'] = extensions
output['seed'] = int(output['seed'])
output['show_controls'] = show_controls
return yaml.dump(output, sort_keys=False, width=float("inf"))