Instructions to use omayib/tralala-trilili with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use omayib/tralala-trilili with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("omayib/tralala-trilili", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
Tralala-Trilili β Indonesian Lyric Popularity Classifier
Memprediksi tingkat popularitas sebuah lirik lagu berbahasa Indonesia (Kurang / Cukup / Sangat populer) berdasarkan data historis chart harian Spotify Indonesia (kworb.net). Dipakai oleh aplikasi Streamlit Tralala-Trilili; dilatih ulang dan divalidasi otomatis oleh pipeline harian.
Proyek ini terinspirasi oleh Lubis & Huda (2025), Implementation of SVM Algorithm to Predict Song Popularity based on Sentiment Analysis of Lyrics (lihat Sitasi).
Model
- Arsitektur: scikit-learn
Pipeline: TF-IDF (sublinear tf) -> TF-IDF + Logistic Regression denganclass_weight="balanced". Dipilih dari benchmark 7 metode (termasuk SVM+SMOTE dan fine-tuning IndoBERT) sebagai model dengan kualitas setara terbaik yang tetap ringan di CPU. - Input: lirik yang sudah dibersihkan (
src/text_utils.clean_lyrics: lowercase, tanpa tanda baca, tanpa penanda verse/chorus/kredit). Dirancang untuk lirik berbahasa Indonesia. - Output:
predict_proba(...)-> peluang[Kurang, Cukup, Sangat populer]. - Kebutuhan hardware: CPU saja, < 50 MB RAM.
import joblib
from huggingface_hub import hf_hub_download
model = joblib.load(hf_hub_download("omayib/tralala-trilili", "virality_model.joblib"))
model.predict_proba(["lirik yang sudah dibersihkan ..."]) # [[p_kurang, p_cukup, p_sangat]]
Data & label
- 1,266 lagu berbahasa Indonesia unik (train 1,022 / golden test 244), lirik dari LRCLIB.
- Popularity = total streams / jumlah hari di chart harian Spotify Indonesia.
- Label (kuartil): Kurang < 13,889 β€ Cukup < 186,564 β€ Sangat populer (streams/hari).
- Golden test set dipilih deterministik lewat hash (artist, title) dan tidak pernah dipakai untuk melatih versi model mana pun, sehingga semua versi bisa dibandingkan secara adil.
Evaluasi (golden test set)
accuracy 0.418 Β· balanced accuracy 0.428 Β· macro-precision 0.407 Β· macro-recall 0.428 Β· macro-F1 0.407
| Model | CV macro-F1 | Accuracy | Balanced acc | Macro-P | Macro-R | Macro-F1 |
|---|---|---|---|---|---|---|
| TF-IDF + LogReg (class_weight) | 0.459 | 0.418 | 0.428 | 0.407 | 0.428 | 0.407 |
| Baseline kelas mayoritas | β | 0.504 | 0.333 | 0.168 | 0.333 | 0.223 |
Validation gate
{
"passed": true,
"reason": "F1 -0.017 vs produksi (toleransi -0.02)",
"n_test": 244,
"candidate": {
"accuracy": 0.418,
"balanced_accuracy": 0.4283,
"precision": 0.4072,
"recall": 0.4283,
"f1": 0.4073
},
"production": {
"accuracy": 0.4672,
"balanced_accuracy": 0.4222,
"precision": 0.4299,
"recall": 0.4222,
"f1": 0.4243
}
}
Lineage
- Dilatih: 2026-10-29T23:10:03+00:00
- Kode (git):
5d100fabd04bc038d8f079528b17a94525791e72 - Data (HF dataset revision):
8e0402f63f5c77ed6b28a1d828c69c9706ed9a08
Batasan
Sinyal popularitas dari lirik saja tergolong moderat: artis, promosi, aransemen, dan tren media sosial sangat berpengaruh. Akurasi turun untuk artis yang tidak ada di data latih. Data hanya mencakup lagu yang pernah masuk chart harian Spotify Indonesia (bias survivorship). Gunakan hasil sebagai indikasi, bukan kepastian.
Sitasi
Proyek ini terinspirasi oleh:
Lubis, Q. L. A., & Huda, A. A. (2025). Implementation of SVM Algorithm to Predict Song Popularity based on Sentiment Analysis of Lyrics. Journal of Applied Informatics and Computing (JAIC), 9(2), 265β272. http://jurnal.polibatam.ac.id/index.php/JAIC
- Downloads last month
- -