This project is a web-based application that offers a chatbot for medical conversations and image-based disease prediction, such as ocular and skin disease predictions. The backend is built using Express.js and integrates with Gradio-hosted machine learning models to provide medical insights.
- Chatbot: A medical chatbot that answers user questions. Each session is treated independently, and the system can store past sessions for later review.
- Ocular Disease Prediction: Upload images of left and right eyes to receive a disease prediction.
- Skin Disease Prediction: Upload an image of a skin area to get a prediction on possible skin conditions.
- Session Management: Each time the chatbot is refreshed, a new session is started. Previous sessions are stored for future reference.
- Backend: Node.js with Express.js
- Frontend: HTML, CSS, JavaScript
- Machine Learning: Gradio-hosted models via Gradio's API
- File Upload: Multer for handling image uploads
- Node.js (v14+)
- NPM (comes with Node.js)
git clone https://github.com/Vinit710/MEDAI
cd MEDAI
npm install
node server.mjs
By default, the server will start on http://localhost:3000
.
.
├── chatbot/
│ ├── __init__.py # Package initializer for chatbot module
│ ├── ocular_diabetes_prediction # Module for ocular disease prediction logic
├── uploads/ # Directory for uploaded images
├── templates/ # Static HTML templates for frontend
│ ├── index.html # Home page
│ ├── about.html # About page
│ ├── chatbot.html # Chatbot page
│ ├── ocular.html # Ocular disease prediction page
│ ├── skin_disease.html # Skin disease prediction page
│ ├── booking.html # Appointment booking page
│ ├── chat.html # Chat interface page
│ ├── symtodie.html # Symptom-to-disease mapping page
| |-- xray.html # x ray model page
│ ├── contact.html # Contact page
│ └── docs.html # Documentation page
├── static/ # Directory for static files (CSS, JS)
├── server.mjs # Server-side logic (Node.js backend and API's)
├── package.json # Project configuration and dependencies
├── package-lock.json # Lockfile for exact dependency versions
├── requirements.txt # Python package dependencies
├── README.md # Project documentation
- POST
/chatbot
- Request Body:
{ "message": "User's message" }
- Response:
{ "reply": "Bot's response" }
- POST
/predict
- File Uploads:
left_image
,right_image
- Response: JSON with prediction data
- POST
/predict_skin
- File Upload:
input_image
- Response: JSON with prediction data
Initially it is deployed on vercel you can try it there: https://medai-phi.vercel.app/
Here are some screenshots of the application:
- Add authentication for storing and retrieving users' chat history securely.
- Improve the chatbot by integrating more advanced natural language processing (NLP) models.
- Expand the disease prediction models to cover more medical conditions.
- Make better UI
- Any other features will be appriated.
This project is licensed under the MIT License.
Make sure to replace the placeholder Gradio
model paths in the code with actual model paths from Gradio once they're available. You can further customize the design in the templates
directory to fit your style preferences.