Update app.py
Browse files
app.py
CHANGED
@@ -202,9 +202,6 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
202 |
|
203 |
|
204 |
# event listeners
|
205 |
-
extra_components = [interpretation_prompt, original_prompt_raw,
|
206 |
-
original_prompt_btn, *interpretation_bubbles]
|
207 |
-
model_chooser.change(reset_model, [model_chooser, *extra_components], extra_components)
|
208 |
|
209 |
for i, btn in enumerate(tokens_container):
|
210 |
btn.click(partial(run_interpretation, i=i), [interpretation_prompt,
|
@@ -216,4 +213,9 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
216 |
[original_prompt_raw],
|
217 |
[progress_dummy, *tokens_container, *interpretation_bubbles])
|
218 |
original_prompt_raw.change(lambda: [gr.Button(visible=False) for _ in range(MAX_PROMPT_TOKENS)], [], tokens_container)
|
|
|
|
|
|
|
|
|
|
|
219 |
demo.launch()
|
|
|
202 |
|
203 |
|
204 |
# event listeners
|
|
|
|
|
|
|
205 |
|
206 |
for i, btn in enumerate(tokens_container):
|
207 |
btn.click(partial(run_interpretation, i=i), [interpretation_prompt,
|
|
|
213 |
[original_prompt_raw],
|
214 |
[progress_dummy, *tokens_container, *interpretation_bubbles])
|
215 |
original_prompt_raw.change(lambda: [gr.Button(visible=False) for _ in range(MAX_PROMPT_TOKENS)], [], tokens_container)
|
216 |
+
|
217 |
+
extra_components = [interpretation_prompt, original_prompt_raw,
|
218 |
+
original_prompt_btn, *interpretation_bubbles]
|
219 |
+
model_chooser.change(reset_model, [model_chooser, *extra_components], extra_components)
|
220 |
+
|
221 |
demo.launch()
|