muzamilhxmi commited on
Commit
bf729ad
Β·
verified Β·
1 Parent(s): 1b3ad0c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -68
README.md CHANGED
@@ -8,98 +8,87 @@ base_model:
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
- # DistilBERT Review Bug Classifier by BlaikHole
20
 
21
- **DistilBERT Review Bug Classifier** is a fine-tuned [DistilBERT](https://huggingface.co/distilbert-base-uncased) model built to automatically classify bug-related review texts. The model distinguishes between four categories:
22
 
23
- - **No:** Reviews that are not bug-related.
24
- - **Performance:** Reviews describing performance issues.
25
- - **Network:** Reviews reporting connectivity or network issues.
26
- - **Graphics:** Reviews referring to graphical or UI/UX problems.
 
 
 
 
27
 
28
- This model is almost perfect for any developers, QA teams, and product managers who want to quickly analyze bug reports from large data of any app store reviews.
29
 
30
- ## Overview
31
 
32
- In real world applications, bug reports and review feedback can be overwhelming. This classifier makes the process easy by automatically categorizing reviews into clear, actionable labels. Using DistilBERT ensures the model is both fast and efficient without affecting accuracy much.
33
 
34
- - **Model Architecture:** DistilBERT for Sequence Classification
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
- ## Why Use This Model?
39
 
40
- - **Efficient & Fast:** DistilBERT is a lighter and faster alternative to BERT with small accuracy loss and is ideal for real-time analysis.
41
- - **Accurate Classification:** The model is fine-tuned to effectively differentiate between major and most common bug report types.
 
 
 
 
42
 
43
- ## Quick Start
44
 
45
- You can load and use the model directly using the Hugging Face Transformers pipeline. The pipeline automatically handles label mapping, so you get a human-readable output without any extra steps.
46
 
47
- ### Example Code
48
 
 
49
  ```python
50
  from transformers import pipeline
51
 
52
- # Define the repository name where your model is hosted
53
- model_name = "blaikhole/distilbert-review-bug-classifier"
54
-
55
- # Load the text classification pipeline
56
- classifier = pipeline("text-classification", model=model_name, tokenizer=model_name)
 
 
57
 
58
- # Example review text
59
- review_text = "This app has terrible performance after the latest update."
60
-
61
- # Get prediction
62
- result = classifier(review_text)
63
- print(result)
64
- ```
65
 
66
- ### Classify text in an excel file
67
-
68
- ```python
69
- #pip install pandas openpyxl transformers tqdm torch
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
- # Define your model repository name
83
- model_name = "blaikhole/distilbert-review-bug-classifier"
 
 
84
 
85
- # Load the text classification pipeline
86
- classifier = pipeline("text-classification", model=model_name, tokenizer=model_name)
87
 
88
- # Read the Excel file with text column
89
- input_file = "input.xlsx" # change this to your input file path
90
- df = pd.read_excel(input_file)
91
 
92
- # Function to classify a single review text
93
- def classify_text(text):
94
- result = classifier(text)[0] # Get the first result
95
- return pd.Series([result['label'], result['score']])
96
 
97
- # Apply the classification function with a tqdm progress bar
98
- df[['label', 'confidence']] = df['text'].progress_apply(classify_text)
 
 
99
 
100
- # Save the output to an Excel file
101
- output_file = "output.xlsx" # change this to your desired output file path
102
- df.to_excel(output_file, index=False)
103
 
104
- print(f"Results saved to {output_file}.")
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