Welcome to the Medical Chatbot project! This chatbot is designed to assist users with medical queries and provide relevant information based on the selected medical specialization. The chatbot is built using Streamlit and various Python libraries, with an integrated Node.js server for the symptom checker feature.
- Overview
- Features
- Prerequisites
- Installation
- Running the Application
- File Structure
- Usage
- Contributing
- License
The Medical Chatbot is built to answer medical queries based on a selected medical specialization, assist users with medication reminders, and provide features like symptom checking, expert consultations, emergency assist, and much more.
Key technologies used:
- Streamlit for the main interface.
- Node.js for symptom checker.
- Google Translate API for multilingual support.
- SQLite for database integration.
- Multiple Medical Specializations: Get tailored responses based on the chosen category (e.g., Cardiologist, Dermatologist, etc.).
- Multilingual Support: Supports English, Hindi, Spanish, French, and German.
- Voice Input & Text-to-Speech: Interact via speech and hear responses from the chatbot.
- Symptom Checker: A separate symptom-checking tool.
- Medication Reminders: Set reminders for medications via notification, email, or voice.
- Consult Experts: Connect with medical professionals for consultations.
- Emergency Assist: Quick access to emergency contacts and ambulance services.
- Document Uploads: Upload medical records and related documents.
- Follow-up Questions: Dynamically generated questions based on the previous query.
- Download Chat History: Save your entire chat as a PDF.
Before cloning and running this project, ensure you have the following installed:
- Python 3.6 or higher: Download Python
- Node.js (for Symptom Checker): Download Node.js
Install required Python libraries using the provided requirements.txt
.
pip install -r requirements.txt
Install Node.js dependencies for the Symptom Checker:
cd chat
npm install
Start by cloning the repository to your local machine using the following command:
git clone https://github.com/GautamBytes/Medecro_AI_PERSONALIZED_PLATFORM.git
Replace <repository-url>
with the actual GitHub repository URL.
Once the repository is cloned, navigate into the project directory:
cd med_chatbot
Install all the required Python packages by running:
pip install -r requirements.txt
Navigate to the chat
directory and install the required Node.js packages:
cd chat
npm install
This will install all the dependencies listed in the package.json
file.
The application requires two terminals to run: one for the main chatbot interface and another for the symptom checker feature.
In the first terminal, navigate to the project root and run the following command to start the chatbot interface using Streamlit:
streamlit run model.py
This will start the chatbot at http://localhost:8501
.
In a second terminal, navigate to the chat
directory and start the symptom checker server:
cd chat
node server.js
The symptom checker will be available at http://localhost:3000
.
Below is a detailed explanation of the file structure for better understanding:
med_chatbot/
β
βββ model.py # Main Python file for running the chatbot with Streamlit
βββ health_tips/ # Health tips resources and files
βββ *.pkl # Preprocessed book files for medical knowledge
βββ Team_Members/ # Team member images
βββ Pre-Uploaded Posts/ # Images for pre-uploaded posts
βββ Bot_Avatars/ # Custom avatars for the chatbot based on medical specialization
βββ chat/ # Symptom checker functionality
β βββ server.js # Node.js server file
β βββ package.json # Node.js dependencies
β βββ package-lock.json # Locked versions of Node.js dependencies
β βββ views/ # EJS files (views) for the symptom checker interface
β βββ public/ # Static assets like CSS files
β βββ images/ # Images used for symptom checker UI
β βββ javascripts/ # Symptom checker logic in `symptom2.js`
βββ patient_image/ # Patient-related images
βββ requirements.txt # Python dependencies
βββ Consult_Experts/ # Files related to the expert consultation feature
βββ medicine_images/ # Images related to medicines for medication reminders
βββ data/ # Medical data used by the chatbot
βββ Talaash/ # Project-specific resources
βββ app.py # Main app logic file
βββ llama_2_model/ # Llama 2 model integration (video for reference)
-
Navigate to the chatbot interface at
http://localhost:8501
after starting the Streamlit server. -
Interact with the chatbot by selecting a medical specialization, asking queries via text or voice input, and exploring follow-up questions.
-
Check symptoms using the symptom checker, available at
http://localhost:3000
after starting the Node.js server. -
Set medication reminders, consult experts, upload medical records, or use the emergency assist feature to assist with medical emergencies.
-
Download chat history as a PDF for future reference.