This repository contains a web-based Q&A chatbot that provides information on various diseases. The chatbot uses Google's Gemini language model for natural language understanding and FAISS for vector-based document retrieval. The chatbot scrapes disease-related data and allows users to ask questions, which are answered based on the context of the scraped data.
- Disease Information Scraper: Scrapes information about a disease from online sources.[Mayo Clinic]http://www.mayoclinic.org
- Q&A Chatbot: Answers user questions based on the scraped information using a conversational interface.
- Natural Language Processing: Utilizes Google's Gemini language model (
gemini-1.5-flash) for generating responses. - Vector-Based Search: Uses FAISS for efficient document retrieval.
- User-Friendly Interface: Built with FastHTML, TailwindCSS, and DaisyUI for a responsive and interactive user experience.
-
Clone the repository:
git clone https://github.com/Umang-Bansal/healthbot.git cd healthbot -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up environment variables: make a file - constants.py and save
GOOGLE_API_KEY=your-google-api-key
-
Run the application:
python app.py
-
Access the application: Open your browser and navigate to http://127.0.0.1:8000.
- Scrape Disease Information:
Enter the name of a disease in the input field and click "Scrape Disease." The application will fetch information related to the disease and prepare it for Q&A.
- Ask Questions:
After scraping, you can ask any questions related to the disease. The chatbot will provide answers based on the context of the scraped data.
This project is licensed under the MIT License. See the LICENSE file for more details.
- LangChain for providing the core components of the chatbot.
- Google for the Gemini language model.
- FAISS for the vector store.
