Model Pipeline - Abstractive summarization
Abstractive summarization creates a short, new summary of a long text by understanding its meaning, like telling a friend what a story is about in your own words.
Jump into concepts and practice - no test required
Abstractive summarization creates a short, new summary of a long text by understanding its meaning, like telling a friend what a story is about in your own words.
Loss
2.3 |****
2.0 |***
1.5 |**
1.0 |*
0.5 |
+-----
1 2 3 4 5 Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 2.30 | 0.20 | Model starts learning, loss high, accuracy low |
| 2 | 1.85 | 0.35 | Loss decreases, model improves summary generation |
| 3 | 1.50 | 0.50 | Better understanding of text, summaries more accurate |
| 4 | 1.20 | 0.60 | Model converging, summaries coherent and concise |
| 5 | 1.00 | 0.68 | Training stabilizes, good balance of loss and accuracy |
abstractive summarization in natural language processing?pipeline('summarization').from transformers import pipeline
summarizer = pipeline('summarization')
text = "Machine learning is a method of data analysis that automates analytical model building. It is a branch of artificial intelligence based on the idea that systems can learn from data, identify patterns and make decisions with minimal human intervention."
summary = summarizer(text, max_length=30, min_length=10, do_sample=False)
print(len(summary[0]['summary_text'].split()))from transformers import pipeline
summarizer = pipeline('summarization')
summary = summarizer(12345)
What is the likely cause of the error?