Minor bug fix (soft prompt was being loaded twice)
This commit is contained in:
parent
56bbc996a4
commit
8b3bb512ef
1 changed files with 4 additions and 6 deletions
|
@ -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')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue