Instructions to use nfhakim/sentiment-analysis-c1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nfhakim/sentiment-analysis-c1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nfhakim/sentiment-analysis-c1")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("nfhakim/sentiment-analysis-c1") model = AutoModelForSequenceClassification.from_pretrained("nfhakim/sentiment-analysis-c1") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("nfhakim/sentiment-analysis-c1")
model = AutoModelForSequenceClassification.from_pretrained("nfhakim/sentiment-analysis-c1")Quick Links
This is the first classification of sentiment analysis for (redacted) task
How to import
import torch
from transformers import BertForSequenceClassification, BertTokenizer, BertConfig
tokenizer = BertTokenizer.from_pretrained("nfhakim/sentiment-analysis-c1")
config = BertConfig.from_pretrained("nfhakim/sentiment-analysis-c1")
model = BertForSequenceClassification.from_pretrained("nfhakim/sentiment-analysis-c1", config=config)
How to use
from transformers import pipeline
nlp = pipeline("text-classification", model="nfhakim/sentiment-analysis-c1")
results = nlp("Your input text here")
- Downloads last month
- 2
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="nfhakim/sentiment-analysis-c1")