mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 14:17:28 +00:00
UI: make Default/Notebook contents persist on page reload
This commit is contained in:
parent
8768b69a2d
commit
f2d802e707
3 changed files with 18 additions and 3 deletions
|
|
@ -230,8 +230,14 @@ def gather_interface_values(*args):
|
|||
def apply_interface_values(state, use_persistent=False):
|
||||
if use_persistent:
|
||||
state = shared.persistent_interface_state
|
||||
if 'textbox-default' in state:
|
||||
state.pop('prompt_menu-default')
|
||||
|
||||
if 'textbox-notebook' in state:
|
||||
state.pop('prompt_menu-notebook')
|
||||
|
||||
elements = list_interface_input_elements()
|
||||
|
||||
if len(state) == 0:
|
||||
return [gr.update() for k in elements] # Dummy, do nothing
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue