dar-tau commited on
Commit
cbc70bb
·
verified ·
1 Parent(s): 962c52a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -187,7 +187,9 @@ with gr.Blocks(theme=gr.themes.Default(), css='styles.css') as demo:
187
  dataset = dataset.filter(info['filter'])
188
  dataset = dataset.shuffle(buffer_size=2000).take(num_examples)
189
  dataset = [row[info['text_col']] for row in dataset]
190
- gr.Examples(dataset, [original_prompt_raw], cache_examples=False)
 
 
191
 
192
  with gr.Group():
193
  original_prompt_raw.render()
 
187
  dataset = dataset.filter(info['filter'])
188
  dataset = dataset.shuffle(buffer_size=2000).take(num_examples)
189
  dataset = [row[info['text_col']] for row in dataset]
190
+ gr.Examples(dataset, [original_prompt_raw, *tokens_container],
191
+ fn=lambda output: output + [gr.Button(visible=False) for _ in range(MAX_PROMPT_TOKENS)],
192
+ run_on_click=True, cache_examples=False)
193
 
194
  with gr.Group():
195
  original_prompt_raw.render()