Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -12,7 +12,7 @@ def format_prompt(message, history):
12
  return prompt
13
 
14
  def generate(
15
- prompt, history, temperature=0.5, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0,
16
  ):
17
  temperature = float(temperature)
18
  if temperature < 1e-2:
@@ -48,6 +48,15 @@ additional_inputs=[
48
  step=0.05,
49
  interactive=True,
50
  info="Higher values generate more diverse outputs",
 
 
 
 
 
 
 
 
 
51
  )
52
  ]
53
 
 
12
  return prompt
13
 
14
  def generate(
15
+ prompt, history, temperature=0.5, max_new_tokens=512, top_p=0.95, repetition_penalty=1.0,
16
  ):
17
  temperature = float(temperature)
18
  if temperature < 1e-2:
 
48
  step=0.05,
49
  interactive=True,
50
  info="Higher values generate more diverse outputs",
51
+ ),
52
+ gr.Slider(
53
+ label="max_new_tokens",
54
+ value=512,
55
+ minimum=1,
56
+ maximum=2048,
57
+ step=1,
58
+ interactive=True,
59
+ info="Higher values allows for longer answers",
60
  )
61
  ]
62