Update app.py
Browse files
app.py
CHANGED
@@ -206,7 +206,7 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
206 |
dataset = dataset.filter(info['filter'])
|
207 |
dataset = dataset.shuffle(buffer_size=2000).take(num_examples)
|
208 |
dataset = [[row[info['text_col']]] for row in dataset]
|
209 |
-
gr.Examples(dataset, [
|
210 |
|
211 |
with gr.Group():
|
212 |
original_prompt_raw.render()
|
@@ -242,7 +242,7 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
|
|
242 |
model_chooser.change(reset_new_model, [model_chooser], [])
|
243 |
|
244 |
for i, btn in enumerate(tokens_container):
|
245 |
-
btn.click(partial(run_interpretation, i=i), [
|
246 |
num_tokens, do_sample, temperature,
|
247 |
top_k, top_p, repetition_penalty, length_penalty,
|
248 |
], [progress_dummy, *interpretation_bubbles])
|
|
|
206 |
dataset = dataset.filter(info['filter'])
|
207 |
dataset = dataset.shuffle(buffer_size=2000).take(num_examples)
|
208 |
dataset = [[row[info['text_col']]] for row in dataset]
|
209 |
+
gr.Examples(dataset, [original_prompt_raw], cache_examples=False)
|
210 |
|
211 |
with gr.Group():
|
212 |
original_prompt_raw.render()
|
|
|
242 |
model_chooser.change(reset_new_model, [model_chooser], [])
|
243 |
|
244 |
for i, btn in enumerate(tokens_container):
|
245 |
+
btn.click(partial(run_interpretation, i=i), [interpretation_prompt,
|
246 |
num_tokens, do_sample, temperature,
|
247 |
top_k, top_p, repetition_penalty, length_penalty,
|
248 |
], [progress_dummy, *interpretation_bubbles])
|