lhzstar commited on
Commit
370e3bc
1 Parent(s): 8bc0535

new commits

Browse files
Files changed (1) hide show
  1. celebbot.py +1 -1
celebbot.py CHANGED
@@ -176,7 +176,7 @@ class CelebBot():
176
 
177
  query = f"Context: {instruction} {knowledge}\n\nChat History: {chat_his}Question: {self.text}\n\nAnswer:"
178
  input_ids = self.QA_tokenizer(f"{query}", return_tensors="pt").input_ids.to(self.QA_model.device)
179
- outputs = self.QA_model.generate(input_ids, max_length=1024, min_length=8, do_sample=True, temperature=0.2, repetition_penalty=2.5)
180
  self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
181
  return self.text
182
 
 
176
 
177
  query = f"Context: {instruction} {knowledge}\n\nChat History: {chat_his}Question: {self.text}\n\nAnswer:"
178
  input_ids = self.QA_tokenizer(f"{query}", return_tensors="pt").input_ids.to(self.QA_model.device)
179
+ outputs = self.QA_model.generate(input_ids, max_length=1024, min_length=8, repetition_penalty=2.5)
180
  self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
181
  return self.text
182