IlyaGusev commited on
Commit
1f3d3fd
1 Parent(s): b10b537

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -42,6 +42,7 @@ tokenizer = MBartTokenizer.from_pretrained(model_name)
42
  model = MBartForConditionalGeneration.from_pretrained(model_name)
43
 
44
  article_text = "..."
 
45
  input_ids = tokenizer(
46
  [article_text],
47
  max_length=600,
@@ -52,7 +53,7 @@ input_ids = tokenizer(
52
 
53
  output_ids = model.generate(
54
  input_ids=input_ids,
55
- repetition_penalty=2.0
56
  )[0]
57
 
58
  summary = tokenizer.decode(output_ids, skip_special_tokens=True)
 
42
  model = MBartForConditionalGeneration.from_pretrained(model_name)
43
 
44
  article_text = "..."
45
+
46
  input_ids = tokenizer(
47
  [article_text],
48
  max_length=600,
 
53
 
54
  output_ids = model.generate(
55
  input_ids=input_ids,
56
+ repetition_penalty=3.0
57
  )[0]
58
 
59
  summary = tokenizer.decode(output_ids, skip_special_tokens=True)