An AI-driven Medical Diagnosis System built using Flask, Python, and Scikit-learn, designed to predict diseases based on user-input symptoms.
- Introduction
- Features
- Technologies Used
- Setup and Installation
- How It Works
- Project Structure
- Sample Inputs
- CSS Styling
- Live Demo
- Future Enhancements
- Development
- License
This project leverages Machine Learning (ML) techniques to assist users in predicting potential diseases based on symptoms. It employs Natural Language Processing (NLP) for symptom recognition and classification using Random Forest Classifier.
- AI-based disease prediction using Random Forest
- User-friendly Flask-based web interface
- TfidfVectorizer for symptom processing
- Interactive and responsive UI
- Secure and scalable
- Backend: Flask (Python)
- Frontend: HTML5, CSS3
- Machine Learning: Scikit-learn, Pandas, NumPy
- Model: Random Forest Classifier
- Hosting: Flask built-in server
- Python 3.7+
- Virtual environment (optional but recommended)
- Install necessary dependencies
- Clone the repository:
git clone https://github.com/your-username/ai-medical-diagnosis.git cd ai-medical-diagnosis - Install required dependencies:
pip install -r requirements.txt
- Run the application:
Open http://127.0.0.1:5000/ in your browser.
python app.py
- Input: User enters symptoms in a text box.
- Processing:
- Symptoms are converted into numerical representations.
- Random Forest Classifier processes the data and predicts the disease.
- Output: The predicted disease is displayed on the UI.
ai-medical-diagnosis/
│
├── app.py # Main Flask application
├── templates/
│ └── index.html # Frontend HTML
├── static/
│ └── styles.css # CSS for styling
├── medical_data.csv # Dataset containing symptoms and diseases
├── medical_diagnosis_model.pkl # Trained model
├── requirements.txt # Dependencies
├── README.md # Documentation
└── LICENSE # Project license
- Example Input:
fever, cough, sore throat - Example Output:
Predicted Disease: Flu
The web application includes an interactive UI with a gradient background, stylish buttons, and responsive design.
Live Demo
(Replace with the deployed link or keep as a placeholder.)
- Improve model accuracy with Deep Learning
- Integrate Real-time API for live symptom analysis
- Deploy on Cloud Platforms (AWS, GCP)
- Fork the repository:
git fork https://github.com/your-username/ai-medical-diagnosis.git
- Create a new branch:
git checkout -b feature-name
- Commit changes:
git commit -m "Added a new feature" - Push the branch:
git push origin feature-name
- Open a Pull Request.
This project is licensed under the MIT License.
💚 THANK YOU! 🚀
