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

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.

Downloads last month
4
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support