Skip to content

A simple and interactive Streamlit web app to classify Indonesian text sentiment (positive, negative, or neutral) using IndoBERT, a pre-trained BERT model fine-tuned for sentiment analysis.

Notifications You must be signed in to change notification settings

Adittt17/sentiment_analysis_indonlu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‡ฎ๐Ÿ‡ฉ IndoBERT Sentiment Classifier

An accurate and efficient sentiment classification system for Indonesian text, powered by IndoBERT. This project demonstrates how a fine-tuned transformer model can effectively classify sentiment in real-world Indonesian documents.

๐Ÿง  Model Highlights

  • Based on indobenchmark/indobert-base-p1 โ€” a pre-trained BERT model for the Indonesian language
  • Fine-tuned on document-level sentiment dataset
  • Supports 3 sentiment classes:
    • Negative
    • Neutral
    • Positive
  • Achieves strong performance on test data with high precision and recall
  • Inference-ready and optimized for deployment

๐Ÿ“Œ Use Case

This model is designed for Indonesian-language applications such as:

  • Social media monitoring
  • Customer feedback analysis
  • Product review classification
  • Public opinion mining

๐Ÿ” Example

Input:

"Merasa kagum dengan toko ini tapi berubah menjadi kecewa setelah transaksi"

Output:

๐Ÿง  Prediction: negative (93.2%)

โš™๏ธ Tech Stack

  • PyTorch โ€” deep learning framework
  • HuggingFace Transformers โ€” for loading and managing the IndoBERT model
  • Git LFS โ€” to store large model weights (>500MB)
  • Streamlit โ€” for quick demo deployment (optional)

๐Ÿ“บ Try the Web App

Want to see the model in action?
๐Ÿ‘‰ Access the live UI here: https://sentiment-analysis-indonlu.streamlit.app/

๐Ÿ“ Model File

Make sure the trained model is stored in the following path:

  • model/best_model.pt

โš ๏ธ Note: The model file is tracked using Git LFS due to its size.

๐Ÿงช Training

The model was trained using a custom implementation of the DocumentSentimentDataset and DocumentSentimentDataLoader from IndoNLU. Training utilized:

  • Adam optimizer
  • Custom metrics calculation
  • GPU acceleration (CUDA)
  • Validation-based evaluation per epoch

๐Ÿ“š Acknowledgements

  • IndoNLU โ€” for Indonesian NLP datasets and benchmarks
  • HuggingFace โ€” for providing model architectures and tokenizer support
  • Adityo Pangestu โ€” for training, optimizing, and deploying the model

๐Ÿ“ฌ Contact

Created by Adityo Pangestu ยท adityopangestu01@gmail.com
Feel free to contribute or extend this project for other NLP tasks such as topic modeling, emotion detection, or intent classification.

About

A simple and interactive Streamlit web app to classify Indonesian text sentiment (positive, negative, or neutral) using IndoBERT, a pre-trained BERT model fine-tuned for sentiment analysis.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published