gabrielwithhappy commited on
Commit
31e21c2
1 Parent(s): 1eb5133

update length_penalty

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -17,7 +17,7 @@ def get_summary(input_text):
17
  summary_model = BartForConditionalGeneration.from_pretrained("ainize/kobart-news")
18
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
19
  summary_text_ids = summary_model.generate(
20
- length_penalty=1,
21
  # top_p=0.9,
22
  max_length=128,
23
  min_length=12,
 
17
  summary_model = BartForConditionalGeneration.from_pretrained("ainize/kobart-news")
18
  input_ids = tokenizer.encode(input_text, return_tensors="pt")
19
  summary_text_ids = summary_model.generate(
20
+ length_penalty=3,
21
  # top_p=0.9,
22
  max_length=128,
23
  min_length=12,