Text Classification
Transformers
PyTorch
English
bert
Trained with AutoTrain
text-embeddings-inference
Instructions to use badalsahani/text-classification-multi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use badalsahani/text-classification-multi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="badalsahani/text-classification-multi")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("badalsahani/text-classification-multi") model = AutoModelForSequenceClassification.from_pretrained("badalsahani/text-classification-multi", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
f7d4007
1
Parent(s): 1680194
Update README.md
Browse files
README.md
CHANGED
|
@@ -37,13 +37,13 @@ co2_eq_emissions:
|
|
| 37 |
|
| 38 |
You can use cURL to access this model:
|
| 39 |
|
| 40 |
-
```
|
| 41 |
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/badalsahani/text-classification-multi
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
| 45 |
|
| 46 |
-
```
|
| 47 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
|
| 49 |
model = AutoModelForSequenceClassification.from_pretrained("badalsahani/text-classification-multi", use_auth_token=True)
|
|
|
|
| 37 |
|
| 38 |
You can use cURL to access this model:
|
| 39 |
|
| 40 |
+
```curl
|
| 41 |
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/badalsahani/text-classification-multi
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
| 45 |
|
| 46 |
+
```python
|
| 47 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
|
| 49 |
model = AutoModelForSequenceClassification.from_pretrained("badalsahani/text-classification-multi", use_auth_token=True)
|