A machine learning-powered web app for predicting diseases from symptoms, with explainable results and prescription suggestions. Built for rapid prototyping, research, and real-world deployment using Streamlit.
- π€ Predicts diseases based on user-input symptoms
- π§ Uses Random Forest, SVM, and Naive Bayes models (ensemble)
- π NLP preprocessing for robust symptom matching
- π Model evaluation and performance metrics
- π Prescription recommendations for predicted diseases
- π Jupyter notebook for exploration and demo
- πΌοΈ Modern, interactive UI with Streamlit
Ai-Driven-Healthcare-Webapp/
β
βββ .gitignore # Git ignore rules
βββ LICENSE # MIT License
βββ pyproject.toml # Python project config (optional)
βββ README.md # Project documentation
βββ requirements.txt # Python dependencies for pip
β
βββ assets/ # Images, icons, and static assets
β βββ generated-icon.png
β
βββ data/ # Datasets
β βββ Testing.csv
β βββ Training.csv
β
βββ models/ # Trained model binaries
β βββ nb_model.pkl
β βββ rf_model.pkl
β βββ svm_model.pkl
β
βββ notebooks/ # Jupyter notebooks for demo/experiments
β βββ disease_pred.ipynb
β
βββ scripts/ # Utility scripts (training, evaluation)
β βββ evaluate_model.py
β βββ train_models.py
β
βββ src/ # All source code
βββ app.py # Streamlit web app entry point
βββ disease_pred.py # Core logic for disease prediction (chat/CLI)
βββ model.py # DiseasePredictor class and ML logic
βββ nlp_processor.py # NLP utilities for symptom extraction
βββ prescriptions.py # Maps diseases to prescription recommendations
βββ symptoms.py # Loads available symptoms from training data
- Clone the repository
git clone <repo-url> cd Ai-Driven-Healthcare-Webapp
- Create and activate a virtual environment
python -m venv venv # On Windows: venv\Scripts\activate # On Mac/Linux: source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
streamlit run app.py- Open the provided local URL in your browser.
- Enter your symptoms in the chat to get predictions and recommendations.
python train_models.py- This will retrain and overwrite the
.pklmodel files usingTraining.csv.
python evaluate_model.py- Outputs accuracy and confusion matrix for the current models.
jupyter notebook disease_pred.ipynbContributions are welcome! Please:
- Fork the repo and create a feature branch
- Add/modify code with clear docstrings and comments
- Write or update tests if needed
- Submit a pull request with a clear description
Developed by @Avnish1447
This project is licensed under the MIT License.