joaogante HF staff commited on
Commit
7bb9775
·
1 Parent(s): d4a2468

better temp control

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,7 @@ assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id).to(torch_de
21
 
22
 
23
  def run_generation(user_text, use_assistant, temperature, max_new_tokens):
24
- if temperature == 0.0:
25
  do_sample = False
26
  else:
27
  do_sample = True
 
21
 
22
 
23
  def run_generation(user_text, use_assistant, temperature, max_new_tokens):
24
+ if temperature < 0.1:
25
  do_sample = False
26
  else:
27
  do_sample = True