The Emergency Assistance System is a responsive platform designed to provide instant support during emergency situations. Users can quickly get help through WhatsApp, add and manage emergency contacts, locate nearby emergency services, and receive first aid advice based on the nature of the emergency. This project integrates machine learning for intelligent decision-making and uses messaging services to ensure swift communication.
- Instant Access via WhatsApp: Reach out for assistance instantly through WhatsApp.
- Emergency Contacts: Add and manage emergency contacts who will be notified in case of an emergency.
- Nearby Emergency Services: Automatically locate nearby hospitals, fire stations, or police stations based on the user’s location. The system allocates resources based on distance, severity of the emergency, and available resources at the location.
- First Aid Guidance: Receive real-time first aid advice based on the type of emergency.
- Python: Used for building machine learning models for decision-making and resource allocation.
- JavaScript: Used for creation of chatbot and serving requests.
- Twilio: Integrated for the WhatsApp chatbot to send and receive messages during an emergency.
- Google Maps API: Used for geolocation and mapping nearby emergency services.
- Python 3.x
- Node.js and npm
- Twilio account for WhatsApp messaging
- Google Maps API key
-
Clone the repository:
git clone https://github.com/navneetnair7/Rakshak-Chatbot.git cd Rakshak-Chatbot
-
Install Python dependencies:
pip install -r requirements.txt
-
Install Node.js dependencies:
npm install
-
Set up environment variables for Twilio and Google Maps API:
- Create a
.env
file in the root directory with the following content:TWILIO_ACCOUNT_SID=your_twilio_account_sid TWILIO_AUTH_TOKEN=your_twilio_auth_token TWILIO_PHONE_NUMBER=your_twilio_whatsapp_number GOOGLE_MAPS_API_KEY=your_google_maps_api_key
- Create a
- Send a WhatsApp message to the Twilio number with the keyword
SOS
. - The bot will respond based on the emergency type you specify.
Once the system is set up and running:
- Open the app on your browser or mobile device.
- Add emergency contacts through first message.
- Use the chatbot via WhatsApp to report an emergency.
- The system will automatically locate nearby services and allocate resources as needed.
- First aid instructions will be sent based on the emergency.