Views
No views yet
model.safetensors Was Detectedmodel.safetensors (even with LFS), you're good to go.config.json and tokenizer filespipeline(), Hugging Face expects these files:config.jsontokenizer_config.jsontokenizer.jsonvocab.txt or similar (depends on tokenizer)If you trained your model usingTraineror saved it withmodel.save_pretrained("folder"), those files should already be there. If not, let me know and I’ll guide you to regenerate them.
1from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
2
3model = AutoModelForSequenceClassification.from_pretrained("Rahul7979/MoodPredictor")
4tokenizer = AutoTokenizer.from_pretrained("Rahul7979/MoodPredictor")
5
6classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
7print(classifier("I love how this works!"))