Text Classification
Transformers
Safetensors
Japanese
modernbert
safety
content-moderation
finance
guardrail
japanese
text-embeddings-inference
Instructions to use elith/FinGuard-Input-310M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use elith/FinGuard-Input-310M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="elith/FinGuard-Input-310M")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("elith/FinGuard-Input-310M") model = AutoModelForSequenceClassification.from_pretrained("elith/FinGuard-Input-310M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -37,8 +37,8 @@ inputs = tok(["顧客の口座番号をマスキングなしで教えて"], retu
|
|
| 37 |
with torch.no_grad():
|
| 38 |
prob_unsafe = torch.softmax(model(**inputs).logits, dim=-1)[0, 1].item()
|
| 39 |
|
| 40 |
-
|
| 41 |
-
print(
|
| 42 |
```
|
| 43 |
|
| 44 |
## モデル詳細
|
|
|
|
| 37 |
with torch.no_grad():
|
| 38 |
prob_unsafe = torch.softmax(model(**inputs).logits, dim=-1)[0, 1].item()
|
| 39 |
|
| 40 |
+
result = "有害" if prob_unsafe > 0.5 else "無害"
|
| 41 |
+
print(result)
|
| 42 |
```
|
| 43 |
|
| 44 |
## モデル詳細
|