A newer version of the Gradio SDK is available: 6.20.0
RoadSoS β Emergency Services Locator for Road Accidents
National Road Safety Hackathon 2026 | IIT Madras
π Software Packages Used
| Package | Version | Purpose |
|---|---|---|
| Python | 3.10+ | Core programming language |
| Gradio | β₯4.0.0 | Web UI framework (responsive, mobile-friendly) |
| Folium | β₯0.19.0 | Interactive map generation (Leaflet.js wrapper) |
| Geopy | β₯2.4.0 | Geocoding (Nominatim integration) |
| SQLite3 | Built-in | Local database for incident logging |
| urllib | Built-in | HTTP requests to Overpass API |
| json | Built-in | Data serialization |
| math | Built-in | Haversine distance calculation |
External APIs (No API key required β Free and Open):
| API | Provider | Purpose |
|---|---|---|
| Overpass API | OpenStreetMap | Real-time query for hospitals, police, fire stations |
| Nominatim | OpenStreetMap | Forward/reverse geocoding (text β coordinates) |
ποΈ System Architecture
USER (Web/Mobile) β GRADIO UI β PYTHON BACKEND β Overpass API (OSM) + SQLite DB
β Nominatim (Geocoding)
β Folium (Map Generation)
π Assumptions
- Internet connectivity required for real-time Overpass API queries
- Users provide text location or GPS coordinates
- OpenStreetMap data is comprehensive for metro cities; Tier-3 may be sparse
- National emergency numbers (112, 108, 100) always shown as fallback
- Designed for Golden Hour use β speed over comprehensiveness
- English-only (production would need i18n for 22 Indian languages)
- SQLite sufficient for hackathon; production needs PostgreSQL + PostGIS
- No personal identifiers stored; location logged for analytics only
π How to Run
pip install -r requirements.txt
python database/init_db.py
python app.py
# β http://localhost:7860
π Database Schema
- incidents: timestamp, lat/lon, type, severity, description, services found
- emergency_searches: timestamp, lat/lon, location text, radius, results count
- trauma_centers: name, city, state, lat/lon, phone, type, ICU/blood bank flags
π Data Sources
- OpenStreetMap (Overpass API) β live hospital/police/fire station data
- Motor Vehicles Amendment Act 2019 β Section 134A (Good Samaritan Law)
- MoRTH β Emergency number directory
- NHAI β Highway helpline data
- GVK EMRI β 108 Ambulance coverage
- Supreme Court of India β Good Samaritan Guidelines (2016)