EE21 commited on
Commit
717319d
1 Parent(s): cfc79e8

Update abstractive_model.py

Browse files
Files changed (1) hide show
  1. abstractive_model.py +1 -1
abstractive_model.py CHANGED
@@ -8,5 +8,5 @@ model = AutoModelForSeq2SeqLM.from_pretrained("EE21/BART-ToSSimplify")
8
  def summarize_with_bart(input_text):
9
  inputs = tokenizer.encode("summarize: " + input_text, return_tensors="pt", max_length=1024, truncation=True)
10
  summary_ids = model.generate(inputs, max_length=200, min_length=50, num_beams=1, early_stopping=False, length_penalty=1)
11
- summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
12
  return summary
 
8
  def summarize_with_bart(input_text):
9
  inputs = tokenizer.encode("summarize: " + input_text, return_tensors="pt", max_length=1024, truncation=True)
10
  summary_ids = model.generate(inputs, max_length=200, min_length=50, num_beams=1, early_stopping=False, length_penalty=1)
11
+ summary = tokenizer.decode(summary_ids[0], skip_special_tokens=False)
12
  return summary