This project implements a text classification system using DistilBERT to categorize customer messages into three categories: feedback, inquiries, and refunds.
train.py: Script for training the DistilBERT model on the provided dataset.classify.py: Script for using the trained model to classify new text inputs.requirements.txt: List of Python dependencies required for the project.
-
Clone this repository:
git clone https://github.com/jpe90/fine-tuned-distilbert-classifier.git cd fine-tuned-distilbert-classifier -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required dependencies:
pip install -r requirements.txt
Training data is located in the data directory:
feedback.txt: Contains customer feedback messagesinquiries.txt: Contains customer inquiry messagesrefunds.txt: Contains customer refund request messages
Each file contains one message per line.
To train the model, run:
python train.py
To use the trained model for classification, run:
python classify.py