mxmax commited on
Commit
fe92635
1 Parent(s): e33e4cf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -60,7 +60,7 @@ def postprocess(text):
60
 
61
  def answer_fn(text, top_p=0.6):
62
  encoding = tokenizer(text=[text], truncation=True, padding=True, max_length=256, return_tensors="pt").to(device)
63
- out = model.generate(**encoding, return_dict_in_generate=True, output_scores=False, max_length=512,temperature=0.5,do_sample=True,repetition_penalty=6.0 ,top_p=top_p)
64
  result = tokenizer.batch_decode(out["sequences"], skip_special_tokens=True)
65
  return postprocess(result[0])
66
  text="宫颈癌的早期会有哪些危险信号"
 
60
 
61
  def answer_fn(text, top_p=0.6):
62
  encoding = tokenizer(text=[text], truncation=True, padding=True, max_length=256, return_tensors="pt").to(device)
63
+ out = model.generate(**encoding, return_dict_in_generate=True, output_scores=False, max_length=512,temperature=0.5,do_sample=True,repetition_penalty=3.0 ,top_p=top_p)
64
  result = tokenizer.batch_decode(out["sequences"], skip_special_tokens=True)
65
  return postprocess(result[0])
66
  text="宫颈癌的早期会有哪些危险信号"