This is a simple Flask-based Health Chatbot that uses Google's Gemini AI to provide responses to health-related questions. The chatbot is designed to answer queries about various health topics such as diseases, symptoms, treatments, nutrition, and fitness.
- Uses Gemini AI (Generative Model) for generating responses.
- Recognizes health-related questions using keyword filtering.
- Flask Web App for easy interaction.
- Supports JSON-based API for chatbot integration.
- Python (Flask)
- Google Gemini AI (Generative Model API)
- HTML/CSS/JavaScript (for frontend)
/health-chatbot
│── app.py # Main Flask app
│── templates/
│ └── index.html # Frontend UI
│── requirements.txt # Python dependencies
│── README.md # Project documentation
git clone https://github.com/jeslipriya/AI-Health-Chatbot.git
cd AI-Health-Chatbotpython -m venv venv
source venv/bin/activate # On macOS/Linux
venv\Scripts\activate # On Windowspip install -r requirements.txtReplace API_KEY in app.py with your actual Google Gemini API Key.
python app.pyAccess the chatbot at http://127.0.0.1:5000/ in your browser.
The chatbot also supports a POST request for API integration:
POST /ask
Request Body: { "question": "What are the symptoms of flu?" }
Response: { "answer": "Flu symptoms include fever, cough, sore throat..." }
- Modify
HEALTH_KEYWORDSinapp.pyto improve keyword filtering. - Edit
index.htmlfor a better UI experience.
Pull requests are welcome! Feel free to suggest improvements.
Let's build smarter health solutions together!