Text Classification
Transformers
Safetensors
English
hs6_classifier
feature-extraction
hs-code
hs6
harmonized-system
hts
tariff
tariff-classification
customs
customs-clearance
trade-compliance
import-export
international-trade
logistics
supply-chain
ecommerce
product-classification
product-categorization
multi-class-classification
english
xlm-roberta
bge-m3
custom_code
Instructions to use Kenpache/hs-code-classifier-en with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kenpache/hs-code-classifier-en with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Kenpache/hs-code-classifier-en", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Kenpache/hs-code-classifier-en", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Quick start: pass trust_remote_code=True to AutoTokenizer
Browse files
README.md
CHANGED
|
@@ -159,7 +159,7 @@ from transformers import AutoModel, AutoTokenizer
|
|
| 159 |
|
| 160 |
REPO = "Kenpache/hs-code-classifier-en"
|
| 161 |
model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
|
| 162 |
-
tokenizer = AutoTokenizer.from_pretrained(REPO)
|
| 163 |
|
| 164 |
model.classify(["men's cotton knitted t-shirt, short sleeve"], tokenizer, top_k=5)
|
| 165 |
# [[{'hs6': '610910', 'score': 0.9983},
|
|
|
|
| 159 |
|
| 160 |
REPO = "Kenpache/hs-code-classifier-en"
|
| 161 |
model = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
|
| 162 |
+
tokenizer = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)
|
| 163 |
|
| 164 |
model.classify(["men's cotton knitted t-shirt, short sleeve"], tokenizer, top_k=5)
|
| 165 |
# [[{'hs6': '610910', 'score': 0.9983},
|