Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,9 +6,6 @@ summarizer = pipeline("summarization", model="facebook/bart-large-cnn")
|
|
| 6 |
|
| 7 |
# Define the function to summarize text
|
| 8 |
def summarize_text(text):
|
| 9 |
-
if not text.strip():
|
| 10 |
-
return "Please enter some text to summarize."
|
| 11 |
-
|
| 12 |
summary = summarizer(text, max_length=150, min_length=30, do_sample=False)
|
| 13 |
return summary[0]["summary_text"]
|
| 14 |
|
|
|
|
| 6 |
|
| 7 |
# Define the function to summarize text
|
| 8 |
def summarize_text(text):
|
|
|
|
|
|
|
|
|
|
| 9 |
summary = summarizer(text, max_length=150, min_length=30, do_sample=False)
|
| 10 |
return summary[0]["summary_text"]
|
| 11 |
|