mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Support for number/bool extension parameters
This commit is contained in:
parent
6da94e358c
commit
2239be2351
@ -613,8 +613,12 @@ if args.chat or args.cai_chat:
|
|||||||
if extension_state[ext][0] == True:
|
if extension_state[ext][0] == True:
|
||||||
params = eval(f"extensions.{ext}.script.params")
|
params = eval(f"extensions.{ext}.script.params")
|
||||||
for param in params:
|
for param in params:
|
||||||
if type(params[param] == str):
|
if type(params[param]) == str:
|
||||||
extensions_ui_elements.append(gr.Textbox(value=params[param], label=param))
|
extensions_ui_elements.append(gr.Textbox(value=params[param], label=param))
|
||||||
|
elif type(params[param]) in [int, float]:
|
||||||
|
extensions_ui_elements.append(gr.Number(value=params[param], label=param))
|
||||||
|
elif type(params[param]) == bool:
|
||||||
|
extensions_ui_elements.append(gr.Checkbox(value=params[param], label=param))
|
||||||
|
|
||||||
def update_extensions_parameters(*kwargs):
|
def update_extensions_parameters(*kwargs):
|
||||||
i = 0
|
i = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user