Text Classification
Transformers
Safetensors
bert
kcbert
kor-hate-sentence
sentimental-analysis
text-embeddings-inference
Instructions to use SJ-Donald/kor-hate-sentence-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SJ-Donald/kor-hate-sentence-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SJ-Donald/kor-hate-sentence-large")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("SJ-Donald/kor-hate-sentence-large") model = AutoModelForSequenceClassification.from_pretrained("SJ-Donald/kor-hate-sentence-large") - Notebooks
- Google Colab
- Kaggle
SJ-Donald/kor-hate-sentence-large
SJ-Donald/kor-hate-sentence-large is pretrained model using follow:
Models
Datasets
How to use
from transformers import TextClassificationPipeline, BertForSequenceClassification, AutoTokenizer+
model_name = 'SJ-Donald/kor-hate-sentence-large'
model = BertForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
pipe = TextClassificationPipeline(
model = model,
tokenizer = tokenizer,
device = 0, # cpu: -1, gpu: gpu number
return_all_scores = True,
function_to_apply = 'sigmoid'
)
for result in pipe("이딴 게임할 거면 방송 그만해라 어휴")[0]:
print(result)
{'label': 'hate', 'score': 0.016597675159573555}
{'label': 'clean', 'score': 0.9842987060546875}
- Downloads last month
- 7