Downloads · 30 days
5
26% of all-time downloads
yondikavl/spam-indobert
spam-indobert is a machine learning model from yondikavl. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Sebuah proyek klasifikasi ulasan spam menggunakan model IndoBERT dan API Flask. Cocok untuk menyaring ulasan negatif atau spam secara otomatis.
Downloads · 30 days
5
26% of all-time downloads
All-time downloads
19
Public
Parameters
124M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt996 MB · 40%
From the Hugging Face model README
Sebuah proyek klasifikasi ulasan spam menggunakan model IndoBERT dan API Flask. Cocok untuk menyaring ulasan negatif atau spam secara otomatis.
Clone repo (opsional):
git clone https://github.com/kamu/spam-review-classifier.git
cd spam-review-classifier
Environment dan Instalasi dependensi:
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
Pastikan file datasetspam.csv berada di dalam folder data/ dengan struktur:
| text | label |
|---|---|
| Ini promo bagus | 0 |
| Transfer uang ke sini | 1 |
Lalu jalankan proses training:
python src/trainer.py
Hasil training akan disimpan di direktori:
model/filter_review_model/
Setelah training selesai, jalankan API Flask dengan perintah:
python app/main.py
API akan aktif di alamat:
http://localhost:5000
POST /filter-review
Request JSON:
{
"text": "Dapatkan pulsa gratis klik di sini"
}
Response JSON:
{
"prediction": 1,
"confidence": 0.9451,
"processed_text": "dapatkan pulsa gratis klik di sini"
}
prediction: 0 = bukan spam, 1 = spam confidence: probabilitas prediksi processed_text: teks yang sudah diproses
Model menggunakan: indobenchmark/indobert-base-p2 Konfigurasi model dan training dapat diatur di src/config.py