Spaces:
Running
Running
Commit
·
52d2d60
1
Parent(s):
b640e62
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,8 @@ def get_text(url):
|
|
| 24 |
|
| 25 |
def get_summary(article):
|
| 26 |
first_sentences = ' '.join(re.split(r'(?<=[.:;])\s', article)[:5])
|
| 27 |
-
|
|
|
|
| 28 |
b = b[0]['summary_text']
|
| 29 |
return b
|
| 30 |
|
|
|
|
| 24 |
|
| 25 |
def get_summary(article):
|
| 26 |
first_sentences = ' '.join(re.split(r'(?<=[.:;])\s', article)[:5])
|
| 27 |
+
print(first_sentences)
|
| 28 |
+
b = summarizer(first_sentences, min_length=20, max_length=100, do_sample=False)
|
| 29 |
b = b[0]['summary_text']
|
| 30 |
return b
|
| 31 |
|