test
Browse files
app.py
CHANGED
@@ -11,11 +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(
|
15 |
summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
|
16 |
summarizer("An apple a day, keeps the doctor away", min_length=50, max_length=150)
|
17 |
|
18 |
-
for result in summarizer(
|
19 |
print(result)
|
20 |
return result
|
21 |
|
@@ -26,8 +26,8 @@ if __name__ == '__main__':
|
|
26 |
fn=summarization,
|
27 |
inputs='text',
|
28 |
outputs='text',
|
29 |
-
title="
|
30 |
-
description="News Summary Generator"
|
31 |
)
|
32 |
app.launch()
|
33 |
|
|
|
11 |
|
12 |
# prefix = "translate English to German: "
|
13 |
|
14 |
+
def summarization(News, Summary):
|
15 |
summarizer = pipeline("summarization", model=model, tokenizer=tokenizer)
|
16 |
summarizer("An apple a day, keeps the doctor away", min_length=50, max_length=150)
|
17 |
|
18 |
+
for result in summarizer(Summary):
|
19 |
print(result)
|
20 |
return result
|
21 |
|
|
|
26 |
fn=summarization,
|
27 |
inputs='text',
|
28 |
outputs='text',
|
29 |
+
title="한국어 뉴스 요약 생성기",
|
30 |
+
description="Korean News Summary Generator"
|
31 |
)
|
32 |
app.launch()
|
33 |
|