lvwerra HF staff commited on
Commit
891f0a3
1 Parent(s): cf94a33

add step to token slider

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ st.markdown('##')
29
  pipe = pipeline('text-generation', model=model, tokenizer=tokenizer)
30
  st.sidebar.header("Generation settings:")
31
  gen_kwargs["do_sample"] = st.sidebar.radio("Decoding strategy", ["Greedy", "Sample"]) == "Sample"
32
- gen_kwargs["max_new_tokens"] = st.sidebar.slider("Number of tokens to generate", value=16, min_value = 8, max_value=256)
33
  if gen_kwargs["do_sample"]:
34
  gen_kwargs["temperature"] = st.sidebar.slider("Temperature", value = 0.2, min_value = 0.0, max_value=2.0, step=0.05)
35
  gen_kwargs["top_k"] = st.sidebar.slider("Top-k", min_value = 0, max_value=100, value = 0)
 
29
  pipe = pipeline('text-generation', model=model, tokenizer=tokenizer)
30
  st.sidebar.header("Generation settings:")
31
  gen_kwargs["do_sample"] = st.sidebar.radio("Decoding strategy", ["Greedy", "Sample"]) == "Sample"
32
+ gen_kwargs["max_new_tokens"] = st.sidebar.slider("Number of tokens to generate", value=16, min_value=8, step=8, max_value=256)
33
  if gen_kwargs["do_sample"]:
34
  gen_kwargs["temperature"] = st.sidebar.slider("Temperature", value = 0.2, min_value = 0.0, max_value=2.0, step=0.05)
35
  gen_kwargs["top_k"] = st.sidebar.slider("Top-k", min_value = 0, max_value=100, value = 0)