acumplid commited on
Commit
fb329f5
1 Parent(s): 359b142

Modified params and top_p

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -45,13 +45,12 @@ def submit_input(input_, num_chunks, max_new_tokens, repetition_penalty, top_k,
45
 
46
  model_parameters = {
47
  "NUM_CHUNKS": num_chunks,
48
- "MAX_NEW_TOKENS": max_new_tokens,
49
- "REPETITION_PENALTY": repetition_penalty,
50
- "TOP_K": top_k,
51
- "TOP_P": top_p,
52
- "DO_SAMPLE": do_sample,
53
- "NUM_BEAMS": num_beams,
54
- "TEMPERATURE": temperature
55
  }
56
 
57
  output, context, source = generate(input_, model_parameters)
@@ -152,8 +151,8 @@ def gradio_app():
152
  )
153
  top_p = Slider(
154
  minimum=0.01,
155
- maximum=1.0,
156
- value=1.0,
157
  label="Top p"
158
  )
159
  do_sample = Checkbox(
 
45
 
46
  model_parameters = {
47
  "NUM_CHUNKS": num_chunks,
48
+ "max_new_tokens": max_new_tokens,
49
+ "repetition_penalty": repetition_penalty,
50
+ "top_k": top_k,
51
+ "top_p": top_p,
52
+ "do_sample": do_sample,
53
+ "temperature": temperature
 
54
  }
55
 
56
  output, context, source = generate(input_, model_parameters)
 
151
  )
152
  top_p = Slider(
153
  minimum=0.01,
154
+ maximum=0.99,
155
+ value=0.99,
156
  label="Top p"
157
  )
158
  do_sample = Checkbox(