Spaces:
Sleeping
Sleeping
Commit
·
75433c3
1
Parent(s):
ece38eb
token length solved
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
|
|
5 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
6 |
|
7 |
# Define the summarization function
|
8 |
-
def summarize_text(article):
|
9 |
summary = summarizer(article, max_length=130, min_length=30, do_sample=False)
|
10 |
return summary[0]['summary_text']
|
11 |
|
|
|
5 |
summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
6 |
|
7 |
# Define the summarization function
|
8 |
+
def summarize_text(article[:1024]):
|
9 |
summary = summarizer(article, max_length=130, min_length=30, do_sample=False)
|
10 |
return summary[0]['summary_text']
|
11 |
|