pablo-rf commited on
Commit
d10611d
1 Parent(s): 39c4cc6

Set few-shot parameters

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -67,10 +67,10 @@ def pass_to_input(generated_gl):
67
  None,
68
  )
69
 
70
- def fewshot_prompt_parameters(max_length, repetition_penalty):
71
  return (
72
- max_length.update(value=20), # max_length
73
- repetition_penalty.update(value=1) # repetition_penalty
74
  )
75
 
76
  def gradio_app():
@@ -129,7 +129,8 @@ def gradio_app():
129
  examples = few_shot_prompts_examples,
130
  inputs = [text_gl],
131
  outputs = [max_length, repetition_penalty],
132
- fn =fewshot_prompt_parameters
 
133
  )
134
 
135
  demo.launch()
 
67
  None,
68
  )
69
 
70
+ def fewshot_prompt_parameters():
71
  return (
72
+ gr.update(value=20), # max_length
73
+ gr.update(value=1) # repetition_penalty
74
  )
75
 
76
  def gradio_app():
 
129
  examples = few_shot_prompts_examples,
130
  inputs = [text_gl],
131
  outputs = [max_length, repetition_penalty],
132
+ fn =fewshot_prompt_parameters,
133
+ run_on_click = True
134
  )
135
 
136
  demo.launch()