mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 09:40:20 +01:00
Minor change to ui.py
This commit is contained in:
parent
de994331a4
commit
c21b73ff37
@ -67,7 +67,6 @@ def list_model_elements():
|
|||||||
'alpha_value'
|
'alpha_value'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
for i in range(torch.cuda.device_count()):
|
for i in range(torch.cuda.device_count()):
|
||||||
elements.append(f'gpu_memory_{i}')
|
elements.append(f'gpu_memory_{i}')
|
||||||
|
|
||||||
@ -76,7 +75,6 @@ def list_model_elements():
|
|||||||
|
|
||||||
def list_interface_input_elements():
|
def list_interface_input_elements():
|
||||||
elements = [
|
elements = [
|
||||||
'preset_menu',
|
|
||||||
'max_new_tokens',
|
'max_new_tokens',
|
||||||
'seed',
|
'seed',
|
||||||
'temperature',
|
'temperature',
|
||||||
@ -158,8 +156,7 @@ def apply_interface_values(state, use_persistent=False):
|
|||||||
if len(state) == 0:
|
if len(state) == 0:
|
||||||
return [gr.update() for k in elements] # Dummy, do nothing
|
return [gr.update() for k in elements] # Dummy, do nothing
|
||||||
else:
|
else:
|
||||||
ans = [state[k] if k in state else gr.update() for k in elements]
|
return [state[k] if k in state else gr.update() for k in elements]
|
||||||
return ans
|
|
||||||
|
|
||||||
|
|
||||||
class ToolButton(gr.Button, gr.components.FormComponent):
|
class ToolButton(gr.Button, gr.components.FormComponent):
|
||||||
|
Loading…
Reference in New Issue
Block a user