momo commited on
Commit
d3f947f
1 Parent(s): 55a84e4
Files changed (1) hide show
  1. app.py +4 -4
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(model_name, text):
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(text):
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="News Summary Generator",
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