Instructions to use TomokiFujihara/twhin-bert-large-japanese-offensiveness-estimation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TomokiFujihara/twhin-bert-large-japanese-offensiveness-estimation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TomokiFujihara/twhin-bert-large-japanese-offensiveness-estimation", trust_remote_code=True)# Load model directly from transformers import AutoModelForSequenceClassification model = AutoModelForSequenceClassification.from_pretrained("TomokiFujihara/twhin-bert-large-japanese-offensiveness-estimation", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -43,8 +43,8 @@ tags:
|
|
| 43 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 44 |
import numpy as np
|
| 45 |
|
| 46 |
-
tokenizer = AutoTokenizer.from_pretrained("Twitter/twhin-bert-
|
| 47 |
-
model = AutoModelForSequenceClassification.from_pretrained("TomokiFujihara/
|
| 48 |
|
| 49 |
|
| 50 |
inputs = tokenizer.encode_plus(text, return_tensors='pt')
|
|
|
|
| 43 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 44 |
import numpy as np
|
| 45 |
|
| 46 |
+
tokenizer = AutoTokenizer.from_pretrained("Twitter/twhin-bert-large")
|
| 47 |
+
model = AutoModelForSequenceClassification.from_pretrained("TomokiFujihara/twhin-bert-large-japanese-offensiveness-estimation", trust_remote_code=True)
|
| 48 |
|
| 49 |
|
| 50 |
inputs = tokenizer.encode_plus(text, return_tensors='pt')
|