ehdwns1516/bart_finetuned_xsum
- This model has been trained as a xsum dataset.
- Input text what you want to summarize.
review generator DEMO: Ainize DEMO
review generator API: Ainize API
Overview
Language model: facebook/bart-large
Language: English
Training data: xsum dataset
Code: See Ainize Workspace
Usage
In Transformers
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("ehdwns1516/bart_finetuned_xsum")
model = AutoModelForSeq2SeqLM.from_pretrained("ehdwns1516/bart_finetuned_xsum")
summarizer = pipeline(
"summarization",
model="ehdwns1516/bart_finetuned_xsum",
tokenizer=tokenizer
)
context = "your context"
result = dict()
result[0] = summarizer(context)[0]