muzamilhxmi
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -8,98 +8,87 @@ base_model:
|
|
8 |
- distilbert/distilbert-base-uncased
|
9 |
pipeline_tag: text-classification
|
10 |
tags:
|
11 |
-
-
|
12 |
-
-
|
13 |
- NLP
|
14 |
-
-
|
15 |
-
-
|
16 |
-
-
|
17 |
- BlaikHole
|
18 |
---
|
19 |
-
# DistilBERT Review Bug Classifier by BlaikHole
|
20 |
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
-
|
25 |
-
-
|
26 |
-
|
|
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
35 |
-
- **Number of Labels:** 4 (No, Performance, Network, Graphics)
|
36 |
-
- **Training:** Fine-tuned using stratified k-fold cross-validation to maximize results accuracy and prevent overfitting.
|
37 |
|
38 |
-
|
39 |
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
|
|
42 |
|
43 |
-
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
48 |
|
|
|
49 |
```python
|
50 |
from transformers import pipeline
|
51 |
|
52 |
-
#
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
57 |
|
58 |
-
#
|
59 |
-
|
60 |
-
|
61 |
-
# Get prediction
|
62 |
-
result = classifier(review_text)
|
63 |
-
print(result)
|
64 |
-
```
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
import pandas as pd
|
72 |
-
from transformers import pipeline
|
73 |
-
from tqdm import tqdm
|
74 |
-
import torch
|
75 |
-
|
76 |
-
# use GPU if available
|
77 |
-
device = 0 if torch.cuda.is_available() else -1
|
78 |
-
|
79 |
-
# Enable progress_apply for pandas
|
80 |
-
tqdm.pandas()
|
81 |
|
82 |
-
#
|
83 |
-
|
|
|
|
|
84 |
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
input_file = "input.xlsx" # change this to your input file path
|
90 |
-
df = pd.read_excel(input_file)
|
91 |
|
92 |
-
|
93 |
-
def classify_text(text):
|
94 |
-
result = classifier(text)[0] # Get the first result
|
95 |
-
return pd.Series([result['label'], result['score']])
|
96 |
|
97 |
-
|
98 |
-
|
|
|
|
|
99 |
|
100 |
-
|
101 |
-
output_file = "output.xlsx" # change this to your desired output file path
|
102 |
-
df.to_excel(output_file, index=False)
|
103 |
|
104 |
-
|
105 |
-
```
|
|
|
8 |
- distilbert/distilbert-base-uncased
|
9 |
pipeline_tag: text-classification
|
10 |
tags:
|
11 |
+
- Bug Detection
|
12 |
+
- Review Classification
|
13 |
- NLP
|
14 |
+
- Deep Learning
|
15 |
+
- App Reviews
|
16 |
+
- Game Reviews
|
17 |
- BlaikHole
|
18 |
---
|
|
|
19 |
|
20 |
+
# π DistilBert Reviews Bug Classifier by BlaikHole
|
21 |
|
22 |
+
<p align="center">
|
23 |
+
<a href="https://huggingface.co/blaikhole/distilbert-review-bug-classifier" target="_blank" rel="noopener noreferrer">
|
24 |
+
<img src="https://img.shields.io/badge/HuggingFace-Model-yellow?logo=huggingface" height="35">
|
25 |
+
</a>
|
26 |
+
<a href="https://huggingface.co/spaces/blaikhole/review-bug-classifier" target="_blank" rel="noopener noreferrer">
|
27 |
+
<img src="https://img.shields.io/badge/Demo-Space-blue?style=flat-square" height="35">
|
28 |
+
</a>
|
29 |
+
</p>
|
30 |
|
31 |
+
## π Overview
|
32 |
|
33 |
+
This repository provides a **fine-tuned** model trained on our **private Playstore reviews data** using **quick still efficient DistilBert architecture**. It can be used for **Reviews classification with 3 classes (with 4th class - No bug)**.
|
34 |
|
35 |
+
---
|
36 |
|
37 |
+
## π¨ Model Outputs & Labels
|
|
|
|
|
38 |
|
39 |
+
The model identifies the following labels:
|
40 |
|
41 |
+
| Label Name | Description |
|
42 |
+
|------------|-------------|
|
43 |
+
| π₯ **LABEL_0 > Graphics Issue** | Screen touch controls issue, graphics flickering, rendering issues. |
|
44 |
+
| π© **LABEL_1 > Network Issue** | Login/signup, account issues, wi-fi/data or ping problems etc. |
|
45 |
+
| π¦ **LABEL_2 > No Bug** | No bug discussion found. |
|
46 |
+
| π¨ **LABEL_3 > Performance Issue** | Overheating mobile, lag, crash, stuck game and so on. |
|
47 |
|
48 |
+
---
|
49 |
|
50 |
+
## π Quick Usage
|
51 |
|
52 |
+
You can easily load and use this model with `transformers`:
|
53 |
|
54 |
+
### πΉ Named Entity Recognition (NER)
|
55 |
```python
|
56 |
from transformers import pipeline
|
57 |
|
58 |
+
# Label Mapping
|
59 |
+
LABEL_MAP = {
|
60 |
+
"LABEL_0": "Graphics issue",
|
61 |
+
"LABEL_1": "Network issue",
|
62 |
+
"LABEL_2": "No Bug",
|
63 |
+
"LABEL_3": "Performance issue"
|
64 |
+
}
|
65 |
|
66 |
+
# Load Text Classification Model
|
67 |
+
MODEL_NAME = "blaikhole/distilbert-review-bug-classifier"
|
68 |
+
classifier = pipeline("text-classification", model=MODEL_NAME, tokenizer=MODEL_NAME)
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
def classify_text(text):
|
71 |
+
result = classifier(text)[0]
|
72 |
+
label = LABEL_MAP.get(result["label"], "Unknown")
|
73 |
+
return f"Predicted Label: {label} (Confidence: {result['score']:.2f})"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
+
# Example Usage
|
76 |
+
if __name__ == "__main__":
|
77 |
+
sample_text = "The game keeps lagging and frame rates drop frequently."
|
78 |
+
print(classify_text(sample_text))
|
79 |
|
80 |
+
```
|
81 |
+
---
|
82 |
|
83 |
+
## π¦ Installation
|
|
|
|
|
84 |
|
85 |
+
To use this model, install the required dependencies:
|
|
|
|
|
|
|
86 |
|
87 |
+
```bash
|
88 |
+
pip install transformers torch
|
89 |
+
```
|
90 |
+
---
|
91 |
|
92 |
+
## π License
|
|
|
|
|
93 |
|
94 |
+
MIT
|
|