Spaces:
Runtime error
Runtime error
Add application file
Browse files
app.py
CHANGED
|
@@ -149,7 +149,7 @@ def main_function(uploaded_filepath):
|
|
| 149 |
|
| 150 |
#abstract the summary with my pipeline and model, deciding the length
|
| 151 |
summarizer = pipeline("summarization", model="pszemraj/long-t5-tglobal-base-sci-simplify")
|
| 152 |
-
summary = summarizer(abstract_text, max_length=100, do_sample=False)[0]['summary_text']
|
| 153 |
|
| 154 |
#keeping just the first sentence, to be sure.
|
| 155 |
sentences = nltk.tokenize.sent_tokenize(summary)
|
|
|
|
| 149 |
|
| 150 |
#abstract the summary with my pipeline and model, deciding the length
|
| 151 |
summarizer = pipeline("summarization", model="pszemraj/long-t5-tglobal-base-sci-simplify")
|
| 152 |
+
summary = summarizer(abstract_text, max_length=100, min_length=50, do_sample=False)[0]['summary_text']
|
| 153 |
|
| 154 |
#keeping just the first sentence, to be sure.
|
| 155 |
sentences = nltk.tokenize.sent_tokenize(summary)
|