IndoBERT Real Estate Chatbot (Intent Classification)
Model Description
This model is a fine-tuned version of the pre-trained indobenchmark/indobert-base-p1. It is specifically trained for intent classification in a real estate virtual assistant (chatbot) system, with a case study on Perumahan Griya Alam Mandiri, Malang Regency, East Java, Indonesia.
Academic Context & Documentation
Important Note: This model was developed exclusively for academic research purposes as part of an Undergraduate Thesis (Skripsi).
- It is an implementation of Transfer Learning (fine-tuning) using the IndoBERT base architecture.
- It is not an official commercial product of Perumahan Griya Alam Mandiri. The dataset and model were utilized strictly to fulfill the research objectives.
Intended Use
The model takes Indonesian conversational text as input and predicts the specific intent of a prospective home buyer (e.g., asking about property prices, locations, facilities, or mortgage/KPR simulations).
Repository Files
All necessary files are provided in the root of this repository for easy integration:
model.safetensors,config.json: The core Hugging Face Transformers model weights and configuration.tokenizer.json,tokenizer_config.json: The tokenizer vocabulary and settings.labelencoder.pkl: A serialized Scikit-Learn LabelEncoder required to map the model's numerical output back to the readable intent string.
Training Results
The following table shows the model's evaluation metrics at each epoch during the fine-tuning process:
| Epoch | Training Loss | Validation Loss | Validation Accuracy |
|---|---|---|---|
| 1 | 0.3861 | 0.2529 | 0.9248 |
| 2 | 0.1034 | 0.1687 | 0.9507 |
| 3 | 0.0303 | 0.1987 | 0.9533 |
| 4 | 0.0312 | 0.1843 | 0.9507 |
| 5 | 0.0194 | 0.1958 | 0.9585 |
Quick Start Code (Python)
Since all files are unified in one repository, you can load the model directly using the Hugging Face Hub library:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from huggingface_hub import hf_hub_download
import torch
import pickle
# 1. Define the Hugging Face model repository
model_id = "whyuwrdhn/indobert-real-estate-chatbot"
# 2. Load Tokenizer and Model directly from Hugging Face
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(model_id)
# 3. Download and Load the Label Encoder from the same repo
encoder_path = hf_hub_download(repo_id=model_id, filename="labelencoder.pkl")
with open(encoder_path, "rb") as f:
label_encoder = pickle.load(f)
# 4. Inference Example
text = "Bisa minta info harga untuk tipe 45?"
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class_id = logits.argmax().item()
# 5. Decode the numerical ID back to the Intent Label
predicted_intent = label_encoder.inverse_transform([predicted_class_id])[0]
print(f"Predicted Intent: {predicted_intent}")