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

fix null input

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,8 +17,9 @@ 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=3,
21
- # top_p=0.9,
 
22
  max_length=128,
23
  min_length=12,
24
  num_beams=4,
 
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
+ input_ids=input_ids,
21
+ length_penalty=2,
22
+ top_p=0.9,
23
  max_length=128,
24
  min_length=12,
25
  num_beams=4,