Instructions to use Rahmat15/tenang-in-model1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Rahmat15/tenang-in-model1 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Rahmat15/tenang-in-model1") - Notebooks
- Google Colab
- Kaggle
Model 1 β Klasifikasi Emosi (Tenang.in)
Model BiLSTM untuk klasifikasi 7 emosi dari teks jurnal harian bahasa Indonesia. Bagian dari sistem deteksi dini burnout Tenang.in.
Performa
| Metrik | Nilai |
|---|---|
| Test Accuracy | 93.75% |
| Test F1 Weighted | 0.9377 |
| Jumlah kelas | 7 emosi |
Label
| ID | Label |
|---|---|
| 0 | anger |
| 1 | anticipation |
| 2 | disgust |
| 3 | fear |
| 4 | joy |
| 5 | sadness |
| 6 | trust |
Artefak
| File | Kegunaan |
|---|---|
| model1_bilstm_final.keras | Model TensorFlow |
| tokenizer_final.pkl | Keras Tokenizer |
| w2v_final.bin | Word2Vec embeddings |
| config.json | Konfigurasi model |
Arsitektur
Input (50 token) β Embedding (Word2Vec pretrained) β BiLSTM(64) β BiLSTM(32) β GlobalMaxPool β Dense(64) β Output softmax (7 kelas) Total params: 422.211 (1.61 MB)
Penggunaan
from inference import EmotionPredictor
predictor = EmotionPredictor()
result = predictor.predict("aku sangat lelah kerja terus menerus")
print(result['label']) # sadness
print(result['confidence']) # 0.918
- Downloads last month
- 21