Downloads · 30 days
3
9% of all-time downloads
kaushalraj27/hospital-department-classifier
hospital-department-classifier is a machine learning model from kaushalraj27. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Task-1: Agentic AI System | Task-2: ML-based Department Prediction
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
35
Public
Parameters
67M
5.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
Task-1: Agentic AI System | Task-2: ML-based Department Prediction
This project implements a Hospital Agentic AI Assistant using a multi-agent architecture. The system supports:
The project is divided into two well-defined tasks:
To design and implement a customer-facing agentic AI system that interacts with patients, manages doctor availability, and handles appointment booking using SQL.
The system is built using specialized agents, each responsible for a specific task:
| Agent | Responsibility |
|---|---|
| Authentication Agent | Handles user login (test user based) |
| Patient Profile Agent | Stores patient details (name, age, issue) |
| Intent Agent | Identifies user intent (symptoms, availability, booking) |
| DB Agent | Queries SQLite database |
| Booking Agent | Performs atomic booking transactions |
| Response Agent | Generates final user responses |
doctors_availability| Column | Description |
|---|---|
| doctor_id | Primary key |
| name | Doctor name |
| department | Department |
| day_of_week | Availability day |
| time_slot | Time range |
| is_booked | Booking status |
patients| Column | Description |
|---|---|
| patient_id | Primary key |
| name | Patient name |
| age | Patient age |
| medical_issue | Patient symptoms |
app.py)streamlit_app.py)pip install -r requirements.txt
python app.py
OR (Streamlit UI)
streamlit run streamlit_app.py
To build a machine learning model that predicts the relevant hospital department based on patient symptoms.
Cardiology
Dermatology
ENT
Endocrinology
Gastroenterology
General Medicine
Neurology
Orthopedics
Psychiatry
Pulmonology
task2_ml/data/Healthcare.csvsymptom_department.csvprepare_dataset.pyThis ensures reproducibility and transparency.
| Item | Value |
|---|---|
| Model | DistilBERT |
| Task | Multi-class classification |
| Framework | HuggingFace Transformers |
| Training | Google Colab (GPU) |
| Loss Function | Cross-Entropy |
| Epochs | 3 |
Classification Report (summary):
Confusion Matrix was generated to analyze misclassification trends and class imbalance.
Note: Some departments show lower precision due to overlapping symptom patterns and dataset imbalance, which is expected in real medical data.
python task2_ml/inference.py
python task2_ml/evaluate.py
The trained_model/ directory is intentionally excluded via .gitignore:
hospital-agentic-ai/
│
├── agents/ # Task-1 agents
├── auth/
├── database/
├── reports/
│
├── task2_ml/
│ ├── data/
│ ├── train.py
│ ├── inference.py
│ ├── evaluate.py
│ ├── model_info.txt
│
├── app.py
├── streamlit_app.py
├── schema.sql
├── requirements.txt
├── .gitignore
└── README.md
This project demonstrates a complete end-to-end AI system combining:
The solution is modular, explainable, and extensible, making it suitable for real-world healthcare automation scenarios.