Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

 
 

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Online Sumbong: Barangay Complaint Classification System

A lightweight Flask-based web app that allows anonymous users to submit complaints in Tagalog and automatically classifies them using a fine-tuned XLM-RoBERTa machine learning model.

This tool was created to complement our existing Barangay Appointment System and Barangay Tanod Tracker, by giving the community an easy, real-time way to voice concerns and let the LGU handle them faster and smarter.


🚀 Features

  • Anonymous complaint submission
  • Real-time classification using NLP
  • Powered by a multilingual transformer (XLM-RoBERTa)
  • SQLite database for logging and record-keeping

🛠️ Setup Instructions

  1. Create your virtual environment

    python3 -m venv venv
    source venv/bin/activate  # or venv\Scripts\activate on Windows
  2. Install required packages

pip install -r requirements.txt
  1. Download the .safetensor from my personal google drive. It is around 1.11 GB
https://drive.google.com/file/d/1CTQAQFW_fOLs4WysBYKZen74QWM7re_-/view?usp=sharing
  1. Initialize the database
python3 init_db.py
  1. Run the web app
python3 main_app.py
  1. Access it locally
http://localhost:9696/complaint

📦 Folder Structure

Online-Sumbong-Barangay-Complaint-System/
│
├── main_app.py                # Flask app
├── ml_model/
│   ├── saved_model/           # tokenizer, model files
│   ├── label_encoder.pkl
│   └── test4.ipynb      # training notebook
│
├── templates/
│   ├── complaint.html
│   └── records.html
│
├── init_db.py
├── requirements.txt
├── README.md
└── LICENSE

🧠 Model Details

  • Transformer : XLM-RoBERTa Base
  • Fine-tuned on : Tagalog complaints dataset (800 training, 200 validation)
  • Categories : 'public concern (community and financial disputes)', 'public concern (garbage and sanitation)', 'public concern (infrastructure issues)', "public concern (programs and services)", "public concern (security and safety)"

🚀 Web app

1749972289162

1749972453881📌 Note

  • The model file (model.safetensors) is too large for GitHub. It's excluded from the repo. For deployment, make sure to place it inside model/saved_model/.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages