Summarization
Transformers
PyTorch
TensorFlow
JAX
Rust
Safetensors
English
bart
text2text-generation
Eval Results (legacy)
Instructions to use facebook/bart-large-cnn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/bart-large-cnn with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="facebook/bart-large-cnn")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn") - Inference
- Notebooks
- Google Colab
- Kaggle
Fix: Replace non-executable >>> prompt style with valid syntax in example code
#93
by anon-repair-bot - opened
README.md
CHANGED
|
@@ -87,7 +87,7 @@ Her eighth husband, Rashid Rajput, was deported in 2006 to his native Pakistan a
|
|
| 87 |
If convicted, Barrientos faces up to four years in prison. Her next court appearance is scheduled for May 18.
|
| 88 |
"""
|
| 89 |
print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
|
| 90 |
-
>>> [{'summary_text': 'Liana Barrientos, 39, is charged with two counts of "offering a false instrument for filing in the first degree" In total, she has been married 10 times, with nine of her marriages occurring between 1999 and 2002. She is believed to still be married to four men.'}]
|
| 91 |
```
|
| 92 |
|
| 93 |
### BibTeX entry and citation info
|
|
|
|
| 87 |
If convicted, Barrientos faces up to four years in prison. Her next court appearance is scheduled for May 18.
|
| 88 |
"""
|
| 89 |
print(summarizer(ARTICLE, max_length=130, min_length=30, do_sample=False))
|
| 90 |
+
# >>> [{'summary_text': 'Liana Barrientos, 39, is charged with two counts of "offering a false instrument for filing in the first degree" In total, she has been married 10 times, with nine of her marriages occurring between 1999 and 2002. She is believed to still be married to four men.'}]
|
| 91 |
```
|
| 92 |
|
| 93 |
### BibTeX entry and citation info
|