test
Browse files
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 |
-
|
15 |
-
summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
|
16 |
-
summarizer(News, min_length=50, max_length=150)
|
17 |
|
18 |
-
|
19 |
-
|
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 |
|