jjae commited on
Commit
d3ccbf1
1 Parent(s): c05d8d2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -72,7 +72,7 @@ model = BartForConditionalGeneration.from_pretrained("jjae/kobart-hashtag")
72
  def make_tag(text):
73
  input_ids = tokenizer.encode(text, return_tensors="pt").to(device)
74
  output = model.generate(input_ids = input_ids, bos_token_id = model.config.bos_token_id,
75
- eos_token_id = model.config.eos_token_id, length_penalty = 2.0, max_length = 50, num_beams = 2)
76
  decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
77
  return decoded_output
78
  ```
 
72
  def make_tag(text):
73
  input_ids = tokenizer.encode(text, return_tensors="pt").to(device)
74
  output = model.generate(input_ids = input_ids, bos_token_id = model.config.bos_token_id,
75
+ eos_token_id = model.config.eos_token_id, length_penalty = 3.0, max_length = 50, num_beams = 4)
76
  decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
77
  return decoded_output
78
  ```