Instructions to use Jjzzzz/agri_classifier_bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Jjzzzz/agri_classifier_bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Jjzzzz/agri_classifier_bert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Jjzzzz/agri_classifier_bert") model = AutoModelForSequenceClassification.from_pretrained("Jjzzzz/agri_classifier_bert") - Notebooks
- Google Colab
- Kaggle
Update config.json
#1
by GautamR - opened
- config.json +7 -7
config.json
CHANGED
|
@@ -11,9 +11,9 @@
|
|
| 11 |
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
"0": "agricultural_scheme",
|
| 14 |
-
"1": "
|
| 15 |
"2": "pest",
|
| 16 |
-
"3": "
|
| 17 |
"4": "weather",
|
| 18 |
"5": "price",
|
| 19 |
"6": "non_agri"
|
|
@@ -22,9 +22,9 @@
|
|
| 22 |
"intermediate_size": 3072,
|
| 23 |
"label2id": {
|
| 24 |
"agricultural_scheme": 0,
|
| 25 |
-
"
|
| 26 |
"pest": 2,
|
| 27 |
-
"
|
| 28 |
"weather": 4,
|
| 29 |
"price": 5,
|
| 30 |
"non_agri": 6
|
|
@@ -38,8 +38,8 @@
|
|
| 38 |
"position_embedding_type": "absolute",
|
| 39 |
"problem_type": "single_label_classification",
|
| 40 |
"torch_dtype": "float32",
|
| 41 |
-
"transformers_version": "4.
|
| 42 |
"type_vocab_size": 2,
|
| 43 |
-
"use_cache":
|
| 44 |
"vocab_size": 30522
|
| 45 |
-
}
|
|
|
|
| 11 |
"hidden_size": 768,
|
| 12 |
"id2label": {
|
| 13 |
"0": "agricultural_scheme",
|
| 14 |
+
"1": "agriculture",
|
| 15 |
"2": "pest",
|
| 16 |
+
"3": "seed",
|
| 17 |
"4": "weather",
|
| 18 |
"5": "price",
|
| 19 |
"6": "non_agri"
|
|
|
|
| 22 |
"intermediate_size": 3072,
|
| 23 |
"label2id": {
|
| 24 |
"agricultural_scheme": 0,
|
| 25 |
+
"agriculture": 1,
|
| 26 |
"pest": 2,
|
| 27 |
+
"seed": 3,
|
| 28 |
"weather": 4,
|
| 29 |
"price": 5,
|
| 30 |
"non_agri": 6
|
|
|
|
| 38 |
"position_embedding_type": "absolute",
|
| 39 |
"problem_type": "single_label_classification",
|
| 40 |
"torch_dtype": "float32",
|
| 41 |
+
"transformers_version": "4.38.2",
|
| 42 |
"type_vocab_size": 2,
|
| 43 |
+
"use_cache": true,
|
| 44 |
"vocab_size": 30522
|
| 45 |
+
}
|