This project implements a chatbot using a Large Language Model (LLM); particularly GPT (Generative Pre-trained Transformer) by EleutherAI, to answer frequently asked questions (FAQs) about diabetes. It leverages Streamlit for the user interface and integrates with Hugging Face transformers for natural language processing.
The Diabetes FAQ Chatbot allows users to ask questions about diabetes and receive responses based on a predefined knowledge base. It utilizes Streamlit for the web interface and Hugging Face models for natural language processing.
The purpose of this project is to provide a user-friendly interface for retrieving information related to diabetes through conversational interactions. By leveraging advanced AI models, the chatbot aims to:
-
Educate: Provide accurate and accessible information about diabetes types, symptoms, treatments, and related topics.
-
Support: Assist users in finding answers to their questions promptly and efficiently.
-
Engage: Foster engagement by offering a conversational interface that mimics human-like responses, enhancing user experience.
This project utilizes the GPT-Neo 125M model from EleutherAI. GPT-Neo is an open-source transformer-based language model, developed as a lightweight alternative to large-scale models like GPT-3. The 125M variant is smaller in size but still capable of generating coherent text and answering questions based on provided contexts.
- Conversation Tab: Users can input questions, and the chatbot responds based on the context of the conversation.
- Database Tab: Displays information about the loaded database file used by the chatbot.
- Chat History Tab: Shows the history of interactions between the user and the chatbot.
-
Clone the repository:
git clone https://github.com/MOAZ47/diabetes-faq-chatbot.git cd diabetes-faq-chatbot
-
Install dependencies:
pip install -r requirements.txt
To run the Streamlit app:
streamlit run app_streamlit.py
To run solely the chatbot app:
python chatbot_logic.py
- app_streamlit.py: Main application script containing the Streamlit app code.
- chatbot_logic.py: Python script containing the chatbot logic.
- data_extraction.py: Python script containing code to scrap data.
- diabetes_faq.pdf: PDF file containing extracted information about Diabetes.
- requirements.txt: List of Python dependencies for the project.
- Python == 3.11.0
- Streamlit
- Transformers (Hugging Face)
- LangChain
All the data has been extracted from the Mayoclinic website
Contributions are welcome! Please fork the repository and create a pull request with your suggested changes.