dejanseo commited on
Commit
c3b2d22
·
verified ·
1 Parent(s): 35a3b04

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -5
README.md CHANGED
@@ -1,5 +1,43 @@
1
- ---
2
- license: other
3
- license_name: link-attribution
4
- license_link: https://dejanmarketing.com/link-attribution/
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: link-attribution
4
+ license_link: https://dejanmarketing.com/link-attribution/
5
+ ---
6
+
7
+ # Model Card: dejanseo/ecommerce-taxonomy-classifier
8
+
9
+ ## Model Description
10
+ **dejanseo/ecommerce-taxonomy-classifier** is a multi-level text classification model designed to categorize ecommerce product descriptions (or similar text) into a hierarchical taxonomy. It uses a pretrained ALBERT (albert-base-v2) backbone and a custom classification head that leverages parent-level one-hot encodings for deeper levels in the taxonomy.
11
+
12
+ ### Model Architecture
13
+ - **Base Model**: [ALBERT (albert-base-v2)](https://huggingface.co/albert-base-v2)
14
+ - **Classification Head**: A linear layer (or multi-layer head) on top of the ALBERT pooled output, concatenated with a parent-level one-hot vector representing the higher-level class.
15
+
16
+ ### Intended Use
17
+ - **Primary Application**: Categorizing product descriptions in online retail or marketplace scenarios.
18
+ - **Potential Use Cases**:
19
+ - E-commerce product listing
20
+ - Product categorization for inventory management
21
+ - Enriching product feeds for better search/discovery
22
+
23
+ ### How to Use
24
+ 1. **Installation**: Install `transformers`, `torch`, etc.
25
+ 2. **Pipeline Example**:
26
+ ```python
27
+ from transformers import AlbertTokenizer, AlbertForSequenceClassification
28
+ import torch
29
+
30
+ # Load tokenizer and model from the Hugging Face Hub
31
+ tokenizer = AlbertTokenizer.from_pretrained("dejanseo/ecommerce-taxonomy-classifier")
32
+ model = AlbertForSequenceClassification.from_pretrained("dejanseo/ecommerce-taxonomy-classifier")
33
+ model.eval()
34
+
35
+ text = "Experience the magic of music with the Clavinova CLP-800 series digital pianos."
36
+ inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
37
+
38
+ with torch.no_grad():
39
+ outputs = model(**inputs)
40
+ logits = outputs.logits
41
+ predicted_class = torch.argmax(logits, dim=-1).item()
42
+
43
+ print("Predicted Class:", predicted_class)