Minor bug fix (soft prompt was being loaded twice)

This commit is contained in:
oobabooga 2023-02-13 23:34:04 -03:00
parent 56bbc996a4
commit 8b3bb512ef

View File

@ -186,8 +186,6 @@ def upload_soft_prompt(file):
with open(Path(f'softprompts/{name}.zip'), 'wb') as f:
f.write(file)
load_soft_prompt(name)
return name
def load_model_wrapper(selected_model):
@ -476,7 +474,7 @@ def create_settings_menus():
softprompts_menu = gr.Dropdown(choices=available_softprompts, value="None", label='Soft prompt')
create_refresh_button(softprompts_menu, lambda : None, lambda : {"choices": get_available_softprompts()}, "refresh-button")
gr.Markdown('Upload a soft prompt:')
gr.Markdown('Upload a soft prompt (.zip format):')
with gr.Row():
upload_softprompt = gr.File(type='binary')