Summarization model doesn't work
Hugging Face Forums [Unofficial]
April 4, 2026
I try to run this below code (provided in Hugging Face’s LLMs course, lesson: Transformers, what can they do?)
from transformers import pipeline
summarize = pipeline("summarization")
summarize(
"""
America has changed dramatically during recent years. Not only has the number of
graduates in traditional engineering disciplines such as mechanical, civil,
electrical, chemical, and aeronautical engineering declined, but in most of
the premier American universities engineering curricula now concentrate on
and encourage largely the study of engineering science. As a result, there
are declining offerings in engineering subjects dealing with infrastructure,
the environment, and related issues, and greater concentration on high
technology subjects, largely supporting increasingly complex scientific
developments. While the latter is important, it should not be at the expense
of more traditional engineering.
Rapidly developing economies such as China and India, as well as other
industrial countries in Europe and Asia, continue to encourage and advance
the teaching of engineering. Both China and India, respectively, graduate
six and eight times as many traditional engineers as does the United States.
Other industrial countries at minimum maintain their output, while America
suffers an increasingly serious decline in the number of engineering graduates
and a lack of well-educated engineers.
"""
)
Return Error as:
I’ve tried running this both on Google Colab and in PyCharm, but I’m seeing the same error in both environments.
Has anyone encountered this issue before or knows what might be causing it?
Discussion in the ATmosphere