Finance Classifier Model
This directory contains the fine-tuned mBERT model for binary financial conversation classification.
Model Files
The model directory should contain:
config.json- Model configurationtokenizer_config.json- Tokenizer configurationspecial_tokens_map.json- Special tokens mappingpytorch_model.bin- Trained model weights (generated by training)
Training
To generate the trained model, run:
cd nlp/
python train_classifier.py
This will:
- Load training data from
../classifier_training.json - Fine-tune bert-base-multilingual-cased on financial vs non-financial classification
- Save the trained model to this directory
Model Details
- Base Model: bert-base-multilingual-cased
- Task: Binary Classification (financial: 1, non-financial: 0)
- Input: Text sentences
- Languages: Multilingual support
- Training File:
classifier_training.json
Usage
from nlp.classifier import FinanceClassifier
clf = FinanceClassifier()
result = clf.predict("Loan lena chahiye")
print(result) # {'prediction': 'financial', 'confidence': 0.95}