momo commited on
Commit
fef80f3
1 Parent(s): fb6a0fa
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -11,14 +11,11 @@ tokenizer = MBartTokenizer.from_pretrained(model_name, src_lang="ko_KR", tgt_lan
11
 
12
  # prefix = "translate English to German: "
13
 
14
- def summarization(News, Summary):
15
- summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
16
- summarizer(News, min_length=50, max_length=150)
17
 
18
- for result in summarizer(News):
19
- print(result)
20
-
21
- return result["summary_text"]
22
 
23
  if __name__ == '__main__':
24
 
 
11
 
12
  # prefix = "translate English to German: "
13
 
14
+ summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
 
 
15
 
16
+ def summarization(News, Summary):
17
+ result = summarizer(News, min_length=50, max_length=150)
18
+ return result["summary_text"]
 
19
 
20
  if __name__ == '__main__':
21