How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("feature-extraction", model="nfhakim/sentiment-analysis-c2")
# Load model directly
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("nfhakim/sentiment-analysis-c2")
model = AutoModel.from_pretrained("nfhakim/sentiment-analysis-c2")
Quick Links

This is the second 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-c2")
config = BertConfig.from_pretrained("nfhakim/sentiment-analysis-c2")
model = BertForSequenceClassification.from_pretrained("nfhakim/sentiment-analysis-c2", config=config)

How to use

from transformers import pipeline
nlp = pipeline("text-classification", model="nfhakim/sentiment-analysis-c2")

results = nlp("Your input text here")
Downloads last month
8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support