Views
No views yet
1from transformers import pipeline
2summarizer = pipeline("summarization", model="Mit1208/Med-Sum")
3
4long_text = "The human brain is the inspiration behind neural network architecture. Human brain cells, called neurons, form a complex, highly interconnected network and send electrical signals to each other to help humans process information. Similarly, an artificial neural network is made of artificial neurons that work together to solve a problem. Artificial neurons are software modules, called nodes, and artificial neural networks are software programs or algorithms that, at their core, use computing systems to solve mathematical calculations."
5result = summarizer(long_text)
6print(result[0]["summary_text"])The human brain is the inspiration behind neural network architecture. Human brain cells, called neurons, form a complex, highly interconnected network and send electrical signals to each other to help humans process information. The artificial neural network is made of artificial neurons that work together to solve a problem.