--- language: en license: apache-2.0 tags: - text-classification - branch-switching - hospital-chatbot - distilbert datasets: - branch_switch_classification widget: - text: "I want to switch to Mumbai branch" - text: "What are your hospital timings?" - text: "Can I change to the branch near my home?" --- # Branch Switch Classification Model This model classifies whether a user wants to switch hospital branches or is asking for general information. ## Model Description - **Model**: DistilBERT for Sequence Classification - **Task**: Binary Classification - **Domain**: Hospital/Healthcare Chatbot - **Classes**: - `True`: User wants to switch branches - `False`: General query/information seeking ## Usage ```python from transformers import DistilBertTokenizer, DistilBertForSequenceClassification import torch # Load model and tokenizer tokenizer = DistilBertTokenizer.from_pretrained("hitty28/branch-switch-classifier") model = DistilBertForSequenceClassification.from_pretrained("hitty28/branch-switch-classifier") # Predict def predict(text): inputs = tokenizer(text, truncation=True, padding='max_length', max_length=128, return_tensors='pt') with torch.no_grad(): outputs = model(**inputs) predictions = torch.nn.functional.softmax(outputs.logits, dim=-1) predicted_class = torch.argmax(predictions, dim=-1).item() return bool(predicted_class) # Example result = predict("I want to switch to Delhi branch") print(result) # True ``` ## Training Data The model was trained on a comprehensive dataset including: - Direct branch switch requests - Location-specific switches - Facility-based switches - Information queries about branches - Medical service inquiries - Edge cases and ambiguous statements ## Performance The model achieves high accuracy in distinguishing between branch switching intents and general information queries.