Spaces:
Sleeping
Sleeping
Kota Takahashi
commited on
Commit
·
bb72d7e
1
Parent(s):
a7b12c0
要約の最大文字数を設定
Browse files- summerizer.py +1 -1
summerizer.py
CHANGED
@@ -22,7 +22,7 @@ class TextSummarizer:
|
|
22 |
# パイプラインを初期化
|
23 |
self.summarizer = pipeline("summarization", model=self.model, tokenizer=self.tokenizer)
|
24 |
|
25 |
-
def summarize(self, text, max_length=
|
26 |
"""
|
27 |
テキストを要約
|
28 |
|
|
|
22 |
# パイプラインを初期化
|
23 |
self.summarizer = pipeline("summarization", model=self.model, tokenizer=self.tokenizer)
|
24 |
|
25 |
+
def summarize(self, text, max_length=20, min_length=10):
|
26 |
"""
|
27 |
テキストを要約
|
28 |
|