Views
No views yet
1from transformers import pipeline
2summarizer = pipeline("summarization", model="AdamCodd/bart-large-xsum-samsum")
3
4conversation = '''Emily: Hey Alex, have you heard about the new restaurant that opened downtown?
5Alex: No, I haven't. What's it called?
6Emily: It's called "Savory Bites." They say it has the best pasta in town.
7Alex: That sounds delicious. When are you thinking of checking it out?
8Emily: How about this Saturday? We can make it a dinner date.
9Alex: Sounds like a plan, Emily. I'm looking forward to it.
10'''
11result = summarizer(conversation)
12print(result)| key | value |
|---|---|
| eval_rouge1 | 54.3073 |
| eval_rouge2 | 29.0947 |
| eval_rougeL | 44.4676 |
| eval_rougeLsum | 49.895 |