Instructions to use philschmid/distilbert-base-uncased-emotion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use philschmid/distilbert-base-uncased-emotion with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="philschmid/distilbert-base-uncased-emotion")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("philschmid/distilbert-base-uncased-emotion") model = AutoModelForSequenceClassification.from_pretrained("philschmid/distilbert-base-uncased-emotion") - Notebooks
- Google Colab
- Kaggle
Commit ·
8b41d3d
1
Parent(s): 8e2a3c8
Upload convert_pytorch_to_flax.py
Browse files
convert_pytorch_to_flax.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import FlaxAutoModelForSequenceClassification
|
| 2 |
+
model = FlaxAutoModelForSequenceClassification.from_pretrained("./", from_pt=True)
|
| 3 |
+
model.save_pretrained("./")
|