MedBot is an intelligent medical chatbot leveraging the capabilities of Llama 2.0 Large Language Model (LLM). This repository provides a comprehensive solution for querying medical and disease-related information from uploaded PDF documents. The web application is built using Chainlit and LangChain to ensure an intuitive and user-friendly interface.
- Llama 2.0 LLM Integration: Utilizes the advanced Llama 2.0 LLM for high-quality natural language understanding and generation.
- PDF Data Upload: Users can upload medical journals and other related PDFs to train the model.
- Medical Query Response: Provides accurate and reliable answers to medical and disease-related questions.
- Chainlit Web Application: Interactive web application interface built using Chainlit.
- LangChain Integration: Enhances data processing and interaction capabilities.
Follow these instructions to get a copy of the project up and running on your local machine.
- Python 3.8 or later
- pip (Python package installer)
- Git
- Clone the Repository:
git clone https://github.com/dvtushar/medbot.git cd medbot
- Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
- Install Dependencies:
pip install -r req.txt
- Start the Chainlit Server:
chainlit run app.py -w
- Access the Web Application: Open your web browser and go to http://localhost:8000.
- Upload PDF Documents:
- Navigate to the upload section of the web application.
- Upload your medical journal PDF files.
- Ask Questions:
- Enter your medical or disease-related query in the provided text box.
- Receive detailed and accurate answers from MedBot.
The project requires the following packages:
- pypdf
- langchain
- torch
- accelerate
- bitsandbytes
- transformers
- sentence_transformers
- faiss_cpu These dependencies are listed in the req.txt file and will be installed when following the installation steps above.
We welcome contributions from the community. Please read the following guidelines before contributing:
- 1.Fork the repository.
- 2.Create a new branch (git checkout -b feature/your-feature).
- 3.Make your changes.
- 4.Commit your changes (git commit -am 'Add new feature').
- 5.Push to the branch (git push origin feature/your-feature).
- 6.Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
- Llama 2.0 LLM
- Chainlit
- LangChain
Download the pretrained lamma 2.0 model using the following link: https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/blob/main/llama-2-7b-chat.ggmlv3.q8_0.bin
Download the pretrained lamma 2.0 model using the following link: https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/blob/main/llama-2-7b-chat.ggmlv3.q8_0.bin