gabrielwithhappy commited on
Commit
c3bcc3d
1 Parent(s): d841b4c

summary config setting

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,7 +18,7 @@ def get_summary(input_text):
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.0,
22
  max_length=1000,
23
  min_length=56,
24
  num_beams=2,
@@ -60,7 +60,7 @@ class news_collector:
60
 
61
  for news_url in news_links:
62
  article = self.get_new_parser(news_url)
63
- self.examples_text.append([get_summary(article.text[:1000]), news_url])
64
 
65
 
66
 
 
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=0.0,
22
  max_length=1000,
23
  min_length=56,
24
  num_beams=2,
 
60
 
61
  for news_url in news_links:
62
  article = self.get_new_parser(news_url)
63
+ self.examples_text.append([get_summary(article.text[:3000]), news_url])
64
 
65
 
66