This project is an AI-powered emergency response system that provides immediate guidance for various medical emergencies. It uses natural language processing to understand user queries and provides appropriate first-aid instructions.
- Real-time emergency response guidance
- Integration with Google's Generative AI for natural language understanding
- Vector database (Pinecone) for fast and accurate emergency matching
- Estimated time of arrival calculation using Google Maps API
- User-friendly interface built with Streamlit
Here's a quick demo of the Emergency Response AI Assistant in action:
DEMO.-.Made.with.Clipchamp.mp4
utils.py: Contains utility functions for API interactions, embedding, and LLM operations.database_setup.py: Script for setting up and populating the Pinecone vector database.emergencies.json: JSON file containing emergency scenarios and corresponding instructions.app.py: Main Streamlit application file.Dockerfile: Instructions for building the Docker container.requirements.txt: List of Python dependencies.
-
Clone the repository:
git clone https://github.com/whitehatjr1001/emergency-response-ai.git cd emergency-response-ai -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` -
Install the required packages:
pip install -r requirements.txt -
Set up your environment variables: Create a
.envfile in the project root and add your API keys:GOOGLE_API_KEY=your_google_api_key MAPS_API_KEY=your_maps_api_key PINECONE_API_KEY=your_pinecone_api_key PINECONE_API_ENV=your_pinecone_environment -
Run the database setup script:
python database_setup.py -
Run the Streamlit app:
streamlit run app.py
-
Clone the repository:
git clone https://github.com/whitehatjr1001/emergency-response-ai.git cd emergency-response-ai -
Create a
.envfile as described in step 4 of the local setup. -
Build the Docker image:
docker build -t emergency-response-ai . -
Run the Docker container:
docker run -p 8501:8501 --env-file .env emergency-response-ai
The application will be accessible at http://localhost:8501.
- Open the Streamlit app in your web browser (http://localhost:8501 if running locally or through Docker).
- Type in your emergency situation or question.
- The AI will analyze your input and provide appropriate guidance.
- For emergencies, it will also estimate the arrival time of medical assistance based on your location.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.