Instantiate a pipeline for summarization with your model, and pass your text to it: | |
from transformers import pipeline | |
summarizer = pipeline("summarization", model="stevhliu/my_awesome_billsum_model") | |
summarizer(text) | |
[{"summary_text": "The Inflation Reduction Act lowers prescription drug costs, health care costs, and energy costs. |