Instructions to use DavinciTech/BERT_Categorizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DavinciTech/BERT_Categorizer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DavinciTech/BERT_Categorizer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DavinciTech/BERT_Categorizer") model = AutoModelForSequenceClassification.from_pretrained("DavinciTech/BERT_Categorizer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
update python example with inference script
Browse files
README.md
CHANGED
|
@@ -14,19 +14,7 @@ This model is designed to categorize IT support tickets into ITIL-standard categ
|
|
| 14 |
|
| 15 |
### How to Use
|
| 16 |
|
| 17 |
-
The DavinciTech/BERT_Categorizer can be used directly after installation via the Hugging Face `transformers` library
|
| 18 |
-
|
| 19 |
-
```python
|
| 20 |
-
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 21 |
-
model_name = "DavinciTech/BERT_Categorizer"
|
| 22 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
| 23 |
-
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 24 |
-
```
|
| 25 |
-
|
| 26 |
-
# Example Usage
|
| 27 |
-
```python
|
| 28 |
-
inputs = tokenizer("Example of a support ticket text", return_tensors="pt")
|
| 29 |
-
```
|
| 30 |
|
| 31 |
### Intended Uses and Limitations
|
| 32 |
|
|
|
|
| 14 |
|
| 15 |
### How to Use
|
| 16 |
|
| 17 |
+
The DavinciTech/BERT_Categorizer can be used directly after installation via the Hugging Face `transformers` library. The model returns a packed array of predictions for all the categories which need to be decoded to find the most likely candidate for each class. Please see the included 'inference.py' script for an example of how to use the model and decode the output.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
### Intended Uses and Limitations
|
| 20 |
|