Text Classification
Transformers
PyTorch
TensorFlow
Rust
Safetensors
English
distilbert
Eval Results (legacy)
Instructions to use Alanhau/test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alanhau/test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Alanhau/test")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Alanhau/test") model = AutoModelForSequenceClassification.from_pretrained("Alanhau/test") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -140,8 +140,8 @@ Example of single-label classification:
|
|
| 140 |
import torch
|
| 141 |
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
|
| 142 |
|
| 143 |
-
tokenizer = DistilBertTokenizer.from_pretrained("
|
| 144 |
-
model = DistilBertForSequenceClassification.from_pretrained("
|
| 145 |
|
| 146 |
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
|
| 147 |
with torch.no_grad():
|
|
|
|
| 140 |
import torch
|
| 141 |
from transformers import DistilBertTokenizer, DistilBertForSequenceClassification
|
| 142 |
|
| 143 |
+
tokenizer = DistilBertTokenizer.from_pretrained("Alanhau/test")
|
| 144 |
+
model = DistilBertForSequenceClassification.from_pretrained("Alanhau/test")
|
| 145 |
|
| 146 |
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
|
| 147 |
with torch.no_grad():
|