How to use from the
Use from the
Transformers library
# 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="marianna13/flan-t5-base-summarization")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("marianna13/flan-t5-base-summarization")
model = AutoModelForSeq2SeqLM.from_pretrained("marianna13/flan-t5-base-summarization", device_map="auto")
Quick Links

Usage

from transformers import pipeline

max_length = 50
min_length = 10
model_id = "marianna13/flan-t5-base-summarization"

summarizer = pipeline("summarization", model=model_id, max_length=max_length, min_length=min_length)

text = ''' For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation, will be able to separate us from the love of God that is in Christ Jesus our Lord.'''
print(text)
print('##### Summary:')
print(summarizer(text)[0]['summary_text'])

#  For I am convinced that neither death nor life, neither angels nor demons, neither the present nor the future, nor any powers, neither height nor depth, nor anything else in all creation, will be able to separate us from the love of God that is in Christ Jesus our Lord.
# ##### Summary:
# "I am convinced that neither death, life, angels, demons, present, future, powers, height, depth, or anything else in all creation can separate us from the love of God that is in Christ Jesus our Lord."
Downloads last month
30
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train marianna13/flan-t5-base-summarization