YanshekWoo commited on
Commit
7b1042c
1 Parent(s): cdbedd8

update generate parameters

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -35,12 +35,13 @@ def chat_func(input_utterance: str, history: Optional[List[str]] = None):
35
  return_tensors='pt',
36
  truncation=True,
37
  max_length=max_length,
38
- top_p=0.95,
39
- do_sample=True,
40
- num_beams=4).input_ids
41
 
42
  output_ids = model.generate(input_ids,
43
- max_new_tokens=30)[0]
 
 
 
44
 
45
  response = tokenizer.decode(output_ids, skip_special_tokens=True)
46
 
 
35
  return_tensors='pt',
36
  truncation=True,
37
  max_length=max_length,
38
+ ).input_ids
 
 
39
 
40
  output_ids = model.generate(input_ids,
41
+ max_new_tokens=30,
42
+ top_p=0.95,
43
+ do_sample=True,
44
+ num_beams=4)[0]
45
 
46
  response = tokenizer.decode(output_ids, skip_special_tokens=True)
47