Skip to content

Latest commit

Β 

History

59 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🩺 Disease Prediction System

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.


πŸš€ Features

  • πŸ€– 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

🌳 Project Structure

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

βš™οΈ Setup

  1. Clone the repository
    git clone <repo-url>
    cd Ai-Driven-Healthcare-Webapp
  2. Create and activate a virtual environment
    python -m venv venv
    # On Windows:
    venv\Scripts\activate
    # On Mac/Linux:
    source venv/bin/activate
  3. Install dependencies
    pip install -r requirements.txt

πŸ–₯️ Usage

🌐 Run the Streamlit Web App

streamlit run app.py
  • Open the provided local URL in your browser.
  • Enter your symptoms in the chat to get predictions and recommendations.

πŸ§ͺ Retrain Models (Optional)

python train_models.py
  • This will retrain and overwrite the .pkl model files using Training.csv.

πŸ“Š Evaluate Models (Optional)

python evaluate_model.py
  • Outputs accuracy and confusion matrix for the current models.

πŸ““ Explore in Jupyter Notebook

jupyter notebook disease_pred.ipynb

🀝 Contributing

Contributions 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

πŸ™‹ Author

Developed by @Avnish1447

GitHubΒ Β EmailΒ Β LinkedIn


πŸ“„ License

This project is licensed under the MIT License.

About

🩺 AI-Driven Healthcare Webapp: Predict diseases from symptoms using machine learning. Fast, user-friendly, and explainableβ€”built with Python and Streamlit to empower users with personalized health insights and recommendations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages