gabrielyang commited on
Commit
d050d19
1 Parent(s): 31e21c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,11 +17,11 @@ 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,
25
  )
26
  # "task_specific_params": {
27
  # "summarization": {
 
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,
24
+ num_beams=2,
25
  )
26
  # "task_specific_params": {
27
  # "summarization": {