Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -43,8 +43,8 @@ def getText(url):
|
|
43 |
|
44 |
|
45 |
def getSummary(article):
|
46 |
-
header = ' '.join(re.split(r'(?<=[.:;])\s', article)[:5])
|
47 |
-
b = summarizer(
|
48 |
b = b[0]['summary_text'].replace(' .', '.').strip()
|
49 |
|
50 |
return b
|
|
|
43 |
|
44 |
|
45 |
def getSummary(article):
|
46 |
+
# header = ' '.join(re.split(r'(?<=[.:;])\s', article)[:5])
|
47 |
+
b = summarizer(article, min_length=15, max_length=120, do_sample=False)
|
48 |
b = b[0]['summary_text'].replace(' .', '.').strip()
|
49 |
|
50 |
return b
|