pablo-rf commited on
Commit
5a9d2e7
1 Parent(s): f7f8a4a

Set few-shot parameters

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -67,6 +67,12 @@ def pass_to_input(generated_gl):
67
  None,
68
  )
69
 
 
 
 
 
 
 
70
  def gradio_app():
71
  with gr.Blocks(theme=fronted_theme) as demo:
72
  with gr.Row():
@@ -121,9 +127,9 @@ def gradio_app():
121
  gr.Examples(
122
  label = "Few-shot prompts",
123
  examples = few_shot_prompts_examples,
124
- inputs = [text_gl,max_length, repetition_penalty],
125
  outputs = generated_gl,
126
- fn =predict
127
  )
128
 
129
  demo.launch()
 
67
  None,
68
  )
69
 
70
+ def fewshot_prompt_parameters():
71
+ return (
72
+ gr.update(value=10), # max_length
73
+ gr.update(value=0.1) # repetition_penalty
74
+ )
75
+
76
  def gradio_app():
77
  with gr.Blocks(theme=fronted_theme) as demo:
78
  with gr.Row():
 
127
  gr.Examples(
128
  label = "Few-shot prompts",
129
  examples = few_shot_prompts_examples,
130
+ inputs = [max_length, repetition_penalty],
131
  outputs = generated_gl,
132
+ fn =fewshot_prompt_parameters
133
  )
134
 
135
  demo.launch()