Instructions to use crodri/MassiveCatalanIntents with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use crodri/MassiveCatalanIntents with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="crodri/MassiveCatalanIntents")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("crodri/MassiveCatalanIntents", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -46,13 +46,13 @@ $ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: applica
|
|
| 46 |
Or Python API:
|
| 47 |
|
| 48 |
```
|
| 49 |
-
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 50 |
-
|
| 51 |
-
model = AutoModelForSequenceClassification.from_pretrained("crodri/MassiveCatalanIntents", use_auth_token=True)
|
| 52 |
|
| 53 |
tokenizer = AutoTokenizer.from_pretrained("crodri/MassiveCatalanIntents", use_auth_token=True)
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
```
|
|
|
|
| 46 |
Or Python API:
|
| 47 |
|
| 48 |
```
|
| 49 |
+
from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
|
|
|
|
|
|
|
| 50 |
|
| 51 |
tokenizer = AutoTokenizer.from_pretrained("crodri/MassiveCatalanIntents", use_auth_token=True)
|
| 52 |
|
| 53 |
+
model = AutoModelForSequenceClassification.from_pretrained("crodri/MassiveCatalanIntents", use_auth_token=True)
|
| 54 |
+
|
| 55 |
+
pipe = pipeline("text-classification",model=model,tokenizer=tokenizer)
|
| 56 |
|
| 57 |
+
result = pipe("afegeix a la llista de la compra un litre de llet")
|
| 58 |
```
|