Add --character flag, add character to settings.json

This commit is contained in:
oobabooga 2023-04-24 13:19:42 -03:00
parent 0c32ae27cc
commit b6af2e56a2
5 changed files with 17 additions and 9 deletions

View file

@ -60,11 +60,11 @@ def apply_interface_values(state, use_persistent=False):
else:
if use_persistent and 'mode' in state:
if state['mode'] == 'instruct':
return [state[k] if k not in ['character_menu'] else gr.update() for k in elements]
return [state[k] if (k not in ['character_menu'] and k in state) else gr.update() for k in elements]
else:
return [state[k] if k not in ['instruction_template'] else gr.update() for k in elements]
return [state[k] if (k not in ['instruction_template'] and k in state) else gr.update() for k in elements]
else:
return [state[k] for k in elements]
return [state[k] if k in state else gr.update() for k in elements]
class ToolButton(gr.Button, gr.components.FormComponent):