Best AI News โ€” Updated Every 3 Hours
Story Page
← All Stories
Home Community Story
Community

Question regarding Transformer's pipeline module [D]

Via r/MachineLearning
Sunday, May 3, 2026 ยท 5:45AM
Summary

from transformers import pipeline , DistilBertTokenizer , DistilBertModel model = DistilBertModel . from_pretrained ('distilbert-base-cased-distilled-squad') # Load a model that is already trained on Question Answering extractor = pipeline ("question-answering") def get_emotion_cause (text, emotion)

Continue reading the full article
Read at r/MachineLearning
www.reddit.com
Back to all stories