Update README.md
Browse files
README.md
CHANGED
@@ -1,219 +1,86 @@
|
|
1 |
---
|
2 |
-
language:
|
|
|
3 |
tags:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
license: apache-2.0
|
9 |
datasets:
|
10 |
-
|
11 |
model-index:
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
---
|
25 |
|
26 |
-
# Model Card for
|
27 |
|
28 |
-
|
29 |
-
|
30 |
-
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
31 |
|
32 |
## Model Details
|
33 |
|
34 |
### Model Description
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
|
40 |
-
- **Developed by:**
|
41 |
-
- **
|
42 |
-
- **
|
43 |
-
- **
|
44 |
-
- **
|
45 |
-
- **License:** [More Information Needed]
|
46 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
- **Repository:** [More Information Needed]
|
53 |
-
- **Paper [optional]:** [More Information Needed]
|
54 |
-
- **Demo [optional]:** [More Information Needed]
|
55 |
|
56 |
## Uses
|
57 |
|
58 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
59 |
-
|
60 |
### Direct Use
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
[More Information Needed]
|
65 |
-
|
66 |
-
### Downstream Use [optional]
|
67 |
-
|
68 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
69 |
-
|
70 |
-
[More Information Needed]
|
71 |
|
72 |
### Out-of-Scope Use
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
[More Information Needed]
|
77 |
|
78 |
## Bias, Risks, and Limitations
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
[More Information Needed]
|
83 |
|
84 |
### Recommendations
|
85 |
|
86 |
-
|
87 |
-
|
88 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
89 |
|
90 |
## How to Get Started with the Model
|
91 |
|
92 |
-
Use the code below to get started with the model
|
93 |
-
|
94 |
-
[More Information Needed]
|
95 |
-
|
96 |
-
## Training Details
|
97 |
-
|
98 |
-
### Training Data
|
99 |
-
|
100 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
101 |
-
|
102 |
-
[More Information Needed]
|
103 |
-
|
104 |
-
### Training Procedure
|
105 |
-
|
106 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
107 |
-
|
108 |
-
#### Preprocessing [optional]
|
109 |
-
|
110 |
-
[More Information Needed]
|
111 |
-
|
112 |
-
|
113 |
-
#### Training Hyperparameters
|
114 |
-
|
115 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
116 |
-
|
117 |
-
#### Speeds, Sizes, Times [optional]
|
118 |
-
|
119 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
120 |
-
|
121 |
-
[More Information Needed]
|
122 |
-
|
123 |
-
## Evaluation
|
124 |
-
|
125 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
126 |
-
|
127 |
-
### Testing Data, Factors & Metrics
|
128 |
-
|
129 |
-
#### Testing Data
|
130 |
-
|
131 |
-
<!-- This should link to a Dataset Card if possible. -->
|
132 |
-
|
133 |
-
[More Information Needed]
|
134 |
-
|
135 |
-
#### Factors
|
136 |
-
|
137 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
138 |
-
|
139 |
-
[More Information Needed]
|
140 |
-
|
141 |
-
#### Metrics
|
142 |
-
|
143 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
144 |
-
|
145 |
-
[More Information Needed]
|
146 |
-
|
147 |
-
### Results
|
148 |
-
|
149 |
-
[More Information Needed]
|
150 |
-
|
151 |
-
#### Summary
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
## Model Examination [optional]
|
156 |
-
|
157 |
-
<!-- Relevant interpretability work for the model goes here -->
|
158 |
-
|
159 |
-
[More Information Needed]
|
160 |
-
|
161 |
-
## Environmental Impact
|
162 |
-
|
163 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
164 |
-
|
165 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
166 |
-
|
167 |
-
- **Hardware Type:** [More Information Needed]
|
168 |
-
- **Hours used:** [More Information Needed]
|
169 |
-
- **Cloud Provider:** [More Information Needed]
|
170 |
-
- **Compute Region:** [More Information Needed]
|
171 |
-
- **Carbon Emitted:** [More Information Needed]
|
172 |
-
|
173 |
-
## Technical Specifications [optional]
|
174 |
-
|
175 |
-
### Model Architecture and Objective
|
176 |
-
|
177 |
-
[More Information Needed]
|
178 |
-
|
179 |
-
### Compute Infrastructure
|
180 |
-
|
181 |
-
[More Information Needed]
|
182 |
-
|
183 |
-
#### Hardware
|
184 |
-
|
185 |
-
[More Information Needed]
|
186 |
-
|
187 |
-
#### Software
|
188 |
-
|
189 |
-
[More Information Needed]
|
190 |
-
|
191 |
-
## Citation [optional]
|
192 |
-
|
193 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
194 |
-
|
195 |
-
**BibTeX:**
|
196 |
-
|
197 |
-
[More Information Needed]
|
198 |
-
|
199 |
-
**APA:**
|
200 |
-
|
201 |
-
[More Information Needed]
|
202 |
-
|
203 |
-
## Glossary [optional]
|
204 |
-
|
205 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
206 |
-
|
207 |
-
[More Information Needed]
|
208 |
-
|
209 |
-
## More Information [optional]
|
210 |
-
|
211 |
-
[More Information Needed]
|
212 |
|
213 |
-
|
|
|
214 |
|
215 |
-
|
|
|
|
|
216 |
|
217 |
-
|
|
|
218 |
|
219 |
-
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
tags:
|
5 |
+
- text-classification
|
6 |
+
- e-commerce
|
7 |
+
- product-classification
|
8 |
+
- distilbert
|
9 |
license: apache-2.0
|
10 |
datasets:
|
11 |
+
- lakritidis/product-classification-and-categorization
|
12 |
model-index:
|
13 |
+
- name: DistilBERT-ProductClassifier
|
14 |
+
results:
|
15 |
+
- task:
|
16 |
+
type: text-classification
|
17 |
+
name: Product Category Classification
|
18 |
+
dataset:
|
19 |
+
name: Product Classification and Categorization
|
20 |
+
type: lakritidis/product-classification-and-categorization
|
21 |
+
metrics:
|
22 |
+
- type: accuracy
|
23 |
+
value: 96.17
|
24 |
+
name: Accuracy
|
25 |
+
base_model:
|
26 |
+
- lxs1/DistilBertForSequenceClassification_6h_768dim
|
27 |
+
- distilbert/distilbert-base-uncased
|
28 |
+
pipeline_tag: text-classification
|
29 |
---
|
30 |
|
31 |
+
# Model Card for DistilBERT-ProductClassifier
|
32 |
|
33 |
+
This is a fine-tuned version of the DistilBERT model, specifically trained for product classification tasks within the e-commerce domain. The model distinguishes between various categories like "CPUs," "Digital Cameras," "Dishwashers," and more, making it useful for organizing and categorizing products in online retail platforms.
|
|
|
|
|
34 |
|
35 |
## Model Details
|
36 |
|
37 |
### Model Description
|
38 |
|
39 |
+
The DistilBERT-ProductClassifier model is trained on an e-commerce dataset to classify products into specific categories. It is optimized for efficient text classification tasks and is designed to work well with limited computational resources. This model leverages the compact DistilBERT architecture, making it suitable for real-time applications, including mobile and web environments.
|
|
|
|
|
40 |
|
41 |
+
- **Developed by:** Adnan AI Labs
|
42 |
+
- **Model type:** DistilBERT fine-tuned for text classification
|
43 |
+
- **Language:** English
|
44 |
+
- **License:** Apache 2.0
|
45 |
+
- **Finetuned from model:** [DistilBERT](https://huggingface.co/distilbert-base-uncased)
|
|
|
|
|
46 |
|
47 |
+
## Model Sources
|
48 |
|
49 |
+
- **Repository:** [Adnan-AI-Labs/DistilBERT-ProductClassifier](https://huggingface.co/Adnan-AI-Labs/DistilBERT-ProductClassifier)
|
|
|
|
|
|
|
|
|
50 |
|
51 |
## Uses
|
52 |
|
|
|
|
|
53 |
### Direct Use
|
54 |
|
55 |
+
The model is intended for classifying products in text-based product listings for e-commerce platforms. Users can use this model to categorize products automatically, reducing the need for manual tagging and improving product discoverability.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
|
57 |
### Out-of-Scope Use
|
58 |
|
59 |
+
This model should not be used for tasks unrelated to product classification or outside the e-commerce context. It is not designed for sentiment analysis, general text generation, or other unrelated NLP tasks.
|
|
|
|
|
60 |
|
61 |
## Bias, Risks, and Limitations
|
62 |
|
63 |
+
The model was trained on e-commerce data and may not perform well on products or categories outside the provided training scope. Additionally, some categories may have less representation in the training data, potentially affecting classification accuracy for those classes.
|
|
|
|
|
64 |
|
65 |
### Recommendations
|
66 |
|
67 |
+
For use cases involving other languages or highly specialized product categories not included in the training data, further fine-tuning may be necessary. Users should validate the model's output before using it for high-stakes decisions.
|
|
|
|
|
68 |
|
69 |
## How to Get Started with the Model
|
70 |
|
71 |
+
Use the code below to get started with the model for product classification:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
+
```python
|
74 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
75 |
|
76 |
+
# Load the model and tokenizer
|
77 |
+
tokenizer = AutoTokenizer.from_pretrained("Adnan-AI-Labs/DistilBERT-ProductClassifier")
|
78 |
+
model = AutoModelForSequenceClassification.from_pretrained("Adnan-AI-Labs/DistilBERT-ProductClassifier")
|
79 |
|
80 |
+
# Create a pipeline for text classification
|
81 |
+
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
82 |
|
83 |
+
# Example usage
|
84 |
+
product_description = "High-resolution digital camera with 20MP sensor."
|
85 |
+
result = classifier(product_description)
|
86 |
+
print(result)
|