YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

RuBERT Tiny Spam Classifier πŸ€–

License: MIT Python 3.10+ HuggingFace

A lightweight Russian language spam classifier based on RuBERT Tiny model. The model can detect spam in text messages with high accuracy while maintaining minimal resource requirements.

πŸ“‹ Requirements

pip install --upgrade pip
pip install -r requirements.txt

πŸ—‚οΈ Project Structure

.
β”œβ”€β”€ cleaned_dataset.csv     # Cleaned dataset
β”œβ”€β”€ messages.csv            # Source dataset
β”œβ”€β”€ model/                  # Trained model
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ inference.py        # Inference script
β”‚   β”œβ”€β”€ preprocess.ipynb    # Data preprocessing notebook
β”‚   └── train.py            # Training script
└── requirements.txt        # Project dependencies

Datasets will not be published at this time.

🎯 Usage

Train

python3 scripts/train.py

Inference

# python3 scripts/inference.py
from scripts.inference import SpamClassifier

classifier = SpamClassifier(model_path="./model")

text = "ΠŸΡ€ΠΈΠ²Π΅Ρ‚, Ρƒ мСня Π΅ΡΡ‚ΡŒ ΠΏΠΎΠ΄Ρ€Π°Π±ΠΎΡ‚ΠΊΠ°, ΠΎΠΏΠ»Π°Ρ‚Π° 100 сСк Ρ€ΡƒΠ±.
is_spam = classifier.classify(text)
print(f"Is spam: {is_spam}")

πŸ“ˆ Metrics

  • Accuracy: 0.99
  • Precision: 0.89
  • Recall: 0.96
  • F1 Score: 0.92

πŸ” Model

The classifier is based on RuBERT Tiny - a lightweight version of RuBERT, optimized for running on low-resource machines. The model is fine-tuned on a dataset of Russian messages for spam classification.

πŸ“ License

MIT License

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support