Roger Condori commited on
Commit
fd5b6f3
1 Parent(s): 64987dd

Added limit tokens

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -167,7 +167,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
167
  gr.HTML("<h3>Only models from the GGML library are accepted. To apply the new configurations, please reload the model.</h3>")
168
  repo_ = gr.Textbox(label="Repository" ,value="TheBloke/Llama-2-7B-Chat-GGML")
169
  file_ = gr.Textbox(label="File name" ,value="llama-2-7b-chat.ggmlv3.q2_K.bin")
170
- max_tokens = gr.inputs.Slider(1, 2048, default=256, label="Max new tokens", step=1)
171
  temperature = gr.inputs.Slider(0.1, 1., default=0.2, label="Temperature", step=0.1)
172
  top_k = gr.inputs.Slider(0.01, 1., default=0.95, label="Top K", step=0.01)
173
  top_p = gr.inputs.Slider(0, 100, default=50, label="Top P", step=1)
 
167
  gr.HTML("<h3>Only models from the GGML library are accepted. To apply the new configurations, please reload the model.</h3>")
168
  repo_ = gr.Textbox(label="Repository" ,value="TheBloke/Llama-2-7B-Chat-GGML")
169
  file_ = gr.Textbox(label="File name" ,value="llama-2-7b-chat.ggmlv3.q2_K.bin")
170
+ max_tokens = gr.inputs.Slider(1, MAX_NEW_TOKENS, default=16, label="Max new tokens", step=1)
171
  temperature = gr.inputs.Slider(0.1, 1., default=0.2, label="Temperature", step=0.1)
172
  top_k = gr.inputs.Slider(0.01, 1., default=0.95, label="Top K", step=0.01)
173
  top_p = gr.inputs.Slider(0, 100, default=50, label="Top P", step=1)