Minor bug fix (soft prompt was being loaded twice)
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user