VictorSanh commited on
Commit
3edb153
β€’
1 Parent(s): 92f5f56

repetition penalty fix

Browse files
Files changed (1) hide show
  1. app_dialogue.py +9 -0
app_dialogue.py CHANGED
@@ -295,6 +295,15 @@ with gr.Blocks(fill_height=True) as demo:
295
  inputs=decoding_strategy,
296
  outputs=temperature,
297
  )
 
 
 
 
 
 
 
 
 
298
  decoding_strategy.change(
299
  fn=lambda selection: gr.Slider(visible=(selection in ["Top P Sampling"])),
300
  inputs=decoding_strategy,
 
295
  inputs=decoding_strategy,
296
  outputs=temperature,
297
  )
298
+ decoding_strategy.change(
299
+ fn=lambda selection: gr.Slider(
300
+ visible=(
301
+ selection in ["contrastive_sampling", "beam_sampling", "Top P Sampling", "sampling_top_k"]
302
+ )
303
+ ),
304
+ inputs=decoding_strategy,
305
+ outputs=repetition_penalty,
306
+ )
307
  decoding_strategy.change(
308
  fn=lambda selection: gr.Slider(visible=(selection in ["Top P Sampling"])),
309
  inputs=decoding_strategy,