acumplid commited on
Commit
3a280a0
1 Parent(s): fb329f5

Modified params

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -37,7 +37,7 @@ def generate(prompt, model_parameters):
37
  )
38
 
39
 
40
- def submit_input(input_, num_chunks, max_new_tokens, repetition_penalty, top_k, top_p, do_sample, num_beams, temperature):
41
  if input_.strip() == "":
42
  gr.Warning("Not possible to inference an empty input")
43
  return None
@@ -75,13 +75,12 @@ def clear():
75
  None,
76
  None,
77
  None,
78
- gr.Slider(value=100),
79
- gr.Slider(value=1.2),
80
  gr.Slider(value=50),
81
- gr.Slider(value=0.95),
82
- gr.Checkbox(value=True),
83
- gr.Slider(value=4),
84
- gr.Slider(value=0.5),
85
  )
86
 
87
 
@@ -125,7 +124,7 @@ def gradio_app():
125
  minimum=1,
126
  maximum=6,
127
  step=1,
128
- value=4,
129
  label="Number of chunks"
130
  )
131
  max_new_tokens = Slider(
@@ -159,13 +158,6 @@ def gradio_app():
159
  value=False,
160
  label="Do sample"
161
  )
162
- num_beams = Slider(
163
- minimum=1,
164
- maximum=4,
165
- step=1,
166
- value=1,
167
- label="Beams"
168
- )
169
  temperature = Slider(
170
  minimum=0.1,
171
  maximum=1,
@@ -173,7 +165,7 @@ def gradio_app():
173
  label="Temperature"
174
  )
175
 
176
- parameters_compontents = [num_chunks, max_new_tokens, repetition_penalty, top_k, top_p, do_sample, num_beams, temperature]
177
 
178
  with gr.Column(variant="panel"):
179
  output = Textbox(
 
37
  )
38
 
39
 
40
+ def submit_input(input_, num_chunks, max_new_tokens, repetition_penalty, top_k, top_p, do_sample, temperature):
41
  if input_.strip() == "":
42
  gr.Warning("Not possible to inference an empty input")
43
  return None
 
75
  None,
76
  None,
77
  None,
78
+ gr.Slider(value=MAX_NEW_TOKENS),
79
+ gr.Slider(value=1.0),
80
  gr.Slider(value=50),
81
+ gr.Slider(value=0.99),
82
+ gr.Checkbox(value=False),
83
+ gr.Slider(value=0.35),
 
84
  )
85
 
86
 
 
124
  minimum=1,
125
  maximum=6,
126
  step=1,
127
+ value=1,
128
  label="Number of chunks"
129
  )
130
  max_new_tokens = Slider(
 
158
  value=False,
159
  label="Do sample"
160
  )
 
 
 
 
 
 
 
161
  temperature = Slider(
162
  minimum=0.1,
163
  maximum=1,
 
165
  label="Temperature"
166
  )
167
 
168
+ parameters_compontents = [num_chunks, max_new_tokens, repetition_penalty, top_k, top_p, do_sample, temperature]
169
 
170
  with gr.Column(variant="panel"):
171
  output = Textbox(