dar-tau commited on
Commit
b7b9e1e
·
verified ·
1 Parent(s): 6b69a3c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -63,6 +63,7 @@ def reset_model(model_name, *extra_components, with_extra_components=True):
63
  if with_extra_components:
64
  return ([welcome_message.format(model_name=model_name)]
65
  + [gr.Textbox(visible=False) for _ in range(len(interpretation_bubbles))]
 
66
  + [*extra_components])
67
 
68
 
@@ -220,6 +221,6 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
220
  original_prompt_raw.change(lambda: [gr.Button(visible=False) for _ in range(MAX_PROMPT_TOKENS)], [], tokens_container)
221
 
222
  extra_components = [interpretation_prompt, original_prompt_raw, original_prompt_btn]
223
- model_chooser.change(reset_model, [model_chooser, *extra_components], [welcome_model, *interpretation_bubbles, *extra_components])
224
 
225
  demo.launch()
 
63
  if with_extra_components:
64
  return ([welcome_message.format(model_name=model_name)]
65
  + [gr.Textbox(visible=False) for _ in range(len(interpretation_bubbles))]
66
+ + [gr.Button(visible=False) for _ in range(len(tokens_container))]
67
  + [*extra_components])
68
 
69
 
 
221
  original_prompt_raw.change(lambda: [gr.Button(visible=False) for _ in range(MAX_PROMPT_TOKENS)], [], tokens_container)
222
 
223
  extra_components = [interpretation_prompt, original_prompt_raw, original_prompt_btn]
224
+ model_chooser.change(reset_model, [model_chooser, *extra_components], [welcome_model, *interpretation_bubbles, *tokens_container, *extra_components])
225
 
226
  demo.launch()