A Streamlit-based web application for predicting breast cancer diagnosis using machine learning. This application uses a Logistic Regression model trained on the Wisconsin Breast Cancer dataset to predict whether a tumor is malignant (M) or benign (B) based on various features.
- Interactive web interface built with Streamlit
- Machine learning model for breast cancer prediction
- Data visualization capabilities
- User-friendly input form for prediction
- Model performance metrics and insights
- Python 3.7+
- pip (Python package installer)
- Clone the repository:
git clone [your-repository-url]
cd streamlit-cancer-predict- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install the required packages:
pip install -r requirements.txtstreamlit-cancer-predict/
├── app/
│ └── main.py # Streamlit application
├── model/
│ └── main.py # Model training and preprocessing
├── data/
│ └── data.csv # Dataset
├── assets/ # Static assets
└── requirements.txt # Project dependencies
- Train the model:
cd model
python main.py- Run the Streamlit app:
cd app
streamlit run main.py- Open your web browser and navigate to the URL shown in the terminal (typically http://localhost:8501)
The application uses a Logistic Regression model with the following features:
- Standardized input features
- 80-20 train-test split
- StandardScaler for feature normalization
- numpy==1.23.4
- pandas==1.5.1
- plotly==5.11.0
- scikit_learn==1.2.2
- streamlit
- altair<5.0.0
Contributions are welcome! Please feel free to submit a Pull Request.
- Wisconsin Breast Cancer Dataset
- Streamlit for the web framework
- Scikit-learn for machine learning capabilities