雷娃 commited on
Commit
ebac2a9
·
1 Parent(s): 050efb9

modify output length

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ client = OpenAI(
12
  )
13
 
14
  # define chat function
15
- def chat(user_input, max_new_tokens=2048):
16
  # chat history
17
  messages_template = [
18
  {"role": "system", "content": "You are Ling, an assistant created by inclusionAI"},
@@ -45,7 +45,7 @@ with gr.Blocks(css="""
45
  )
46
 
47
  with gr.Row():
48
- max_tokens_slider = gr.Slider(minimum=128, maximum=2048, step=16, label="Generated length")
49
 
50
  # output_box = gr.Textbox(lines=10, label="Response")
51
  output_box = gr.Markdown(label="Response", elem_id="markdown-output")
 
12
  )
13
 
14
  # define chat function
15
+ def chat(user_input, max_new_tokens=20480):
16
  # chat history
17
  messages_template = [
18
  {"role": "system", "content": "You are Ling, an assistant created by inclusionAI"},
 
45
  )
46
 
47
  with gr.Row():
48
+ max_tokens_slider = gr.Slider(minimum=128, maximum=20480, step=160, label="Generated length")
49
 
50
  # output_box = gr.Textbox(lines=10, label="Response")
51
  output_box = gr.Markdown(label="Response", elem_id="markdown-output")