MedChat is a Python-based chatbot designed to assist users with queries related to medicines. It uses Natural Language Processing (NLP) to provide relevant information from a local dataset of medicines, ensuring users receive accurate and trustworthy information.
- Accurate Medicine Information: Responds with detailed information about medicines based on user queries.
- Advanced Search Capabilities: Uses FAISS to search the pre-indexed medicine database for relevant documents.
- Groq Integration: The chatbot leverages Groq's powerful model for generating intelligent, context-aware responses.
- User-friendly Interface: Built with Gradio for a seamless and interactive web interface.
- Python for backend development
- FAISS for fast similarity search
- Sentence-Transformers for encoding queries
- Groq API for generating responses
- Gradio for the user interface
To run the MedChat chatbot on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/MedChat.git cd MedChat
-
Install dependencies:
Ensure you have Python 3.7 or higher installed. Install the required Python packages:
pip install -r requirements.txt
-
Set up your Groq API key:
You will need a Groq API key to generate responses. Set it as an environment variable:
export API_KEY="your_groq_api_key"
Alternatively, you can set the API key in your
.env
file. -
Run the chatbot:
Launch the MedChat chatbot:
python app.py
The chatbot interface will open in your browser.
- User Input: The user asks a question related to medicine in the input textbox.
- Query Processing: The query is processed using Sentence-Transformers to encode the text and find relevant documents from the indexed dataset.
- Response Generation: Using Groq's powerful AI model, the chatbot generates a response based on the retrieved document and query context.
- Final Output: The response is displayed in the output textbox, providing the user with accurate medicine-related information.
What is Paracetamol used for?
"Paracetamol is a common pain reliever and fever reducer. It is often used to treat headaches, muscle aches, and reduce fever. It is commonly available in tablet, liquid, and suppository forms."
MedChat provides only general information about medicines. It is not a substitute for professional medical advice, diagnosis, or treatment. Always consult a healthcare professional for medical prescriptions and advice.
This project is licensed under the Apache License - see the LICENSE file for details.
We welcome contributions! If you'd like to contribute to MedChat, feel free to fork the repository, create a branch, and submit a pull request. Please ensure that your code adheres to the style guidelines and passes tests.
For any inquiries or support, you can contact the project maintainer via GitHub issues or email.