patpizio commited on
Commit
2e52e56
·
1 Parent(s): 48ce219

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,7 +10,7 @@ model_checkpoint = st.selectbox(
10
  label_visibility=st.session_state.visibility,
11
  disabled=st.session_state.disabled,
12
  )
13
- temperature = st.number_input('Temperature: ', min_value=0, max_value=1, format='%f')
14
 
15
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
16
 
@@ -37,7 +37,7 @@ input_ids = inputs["input_ids"]#.to("cuda")
37
 
38
  generation_config = GenerationConfig(
39
  do_sample=True,
40
- temperature=0.8, # default 0.1
41
  top_p=0.995, # default 0.75
42
  top_k=100, # default 80
43
  repetition_penalty=1.5,
 
10
  label_visibility=st.session_state.visibility,
11
  disabled=st.session_state.disabled,
12
  )
13
+ temperature = st.number_input('Temperature: ', min_value=0, max_value=1, value=0.5, format='%f')
14
 
15
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
16
 
 
37
 
38
  generation_config = GenerationConfig(
39
  do_sample=True,
40
+ temperature=temperature,
41
  top_p=0.995, # default 0.75
42
  top_k=100, # default 80
43
  repetition_penalty=1.5,