Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,164 +1,43 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
```
|
| 45 |
-
|
| 46 |
-
## Usage
|
| 47 |
-
|
| 48 |
-
### Running the Web Interface
|
| 49 |
-
|
| 50 |
-
1. Navigate to the code directory:
|
| 51 |
-
```bash
|
| 52 |
-
cd code
|
| 53 |
-
```
|
| 54 |
-
|
| 55 |
-
2. Launch the Gradio interface:
|
| 56 |
-
```bash
|
| 57 |
-
python gradio_interface.py
|
| 58 |
-
```
|
| 59 |
-
|
| 60 |
-
3. Open your web browser and go to the URL displayed in the terminal (typically `http://localhost:7860`)
|
| 61 |
-
|
| 62 |
-
### Using the Interface
|
| 63 |
-
|
| 64 |
-
1. Adjust the sliders for each patient characteristic:
|
| 65 |
-
- Age
|
| 66 |
-
- Gender
|
| 67 |
-
- Air Pollution
|
| 68 |
-
- Alcohol Use
|
| 69 |
-
- Dust Allergy
|
| 70 |
-
- Occupational Hazards
|
| 71 |
-
- Genetic Risk
|
| 72 |
-
- Chronic Lung Disease
|
| 73 |
-
- Balanced Diet
|
| 74 |
-
- Obesity
|
| 75 |
-
|
| 76 |
-
2. The prediction will update automatically, showing:
|
| 77 |
-
- Risk Level
|
| 78 |
-
- Classification Result
|
| 79 |
-
|
| 80 |
-
3. You can also use the provided example cases to see predictions for real patient data.
|
| 81 |
-
|
| 82 |
-
## Input Features
|
| 83 |
-
|
| 84 |
-
| Feature | Range | Description |
|
| 85 |
-
|---------|--------|-------------|
|
| 86 |
-
| Age | Integer value | Patient's age |
|
| 87 |
-
| Gender | 0-1 | Patient's gender |
|
| 88 |
-
| Air Pollution | 0-1 | Exposure level to air pollution |
|
| 89 |
-
| Alcohol Use | 0-1 | Level of alcohol consumption |
|
| 90 |
-
| Dust Allergy | 0-1 | Severity of dust allergy |
|
| 91 |
-
| Occupational Hazards | 0-1 | Level of occupational risk exposure |
|
| 92 |
-
| Genetic Risk | 0-1 | Genetic risk factor |
|
| 93 |
-
| Chronic Lung Disease | 0-1 | Presence and severity of lung disease |
|
| 94 |
-
| Balanced Diet | 0-1 | Assessment of dietary habits |
|
| 95 |
-
| Obesity | 0-1 | Body mass index classification |
|
| 96 |
-
|
| 97 |
-
## Model Output
|
| 98 |
-
|
| 99 |
-
The model provides two key pieces of information:
|
| 100 |
-
1. Risk Level: A categorical assessment of cancer risk
|
| 101 |
-
2. Class: The numerical classification of risk level
|
| 102 |
-
|
| 103 |
-
## Technical Details
|
| 104 |
-
|
| 105 |
-
- The model is implemented using PyTorch
|
| 106 |
-
- Interface is built using Gradio
|
| 107 |
-
- Data preprocessing is handled using Pandas and NumPy
|
| 108 |
-
- Model architecture: Artificial Neural Network (ANN)
|
| 109 |
-
|
| 110 |
-
## Dataset
|
| 111 |
-
|
| 112 |
-
The model is trained on a comprehensive dataset of cancer patient characteristics, including:
|
| 113 |
-
- Demographic information
|
| 114 |
-
- Environmental factors
|
| 115 |
-
- Lifestyle choices
|
| 116 |
-
- Medical history
|
| 117 |
-
- Genetic factors
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
=======
|
| 121 |
-
---
|
| 122 |
-
title: Cancer Risk Prediction Model
|
| 123 |
-
emoji: π₯
|
| 124 |
-
colorFrom: blue
|
| 125 |
-
colorTo: red
|
| 126 |
-
sdk: gradio
|
| 127 |
-
sdk_version: 3.50.0
|
| 128 |
-
app_file: app.py
|
| 129 |
-
pinned: false
|
| 130 |
-
license: mit
|
| 131 |
-
---
|
| 132 |
-
|
| 133 |
-
# Cancer Risk Prediction Model
|
| 134 |
-
|
| 135 |
-
This Gradio web application predicts cancer risk levels (Low, Medium, High) based on patient characteristics using a neural network model.
|
| 136 |
-
|
| 137 |
-
## Model Details
|
| 138 |
-
|
| 139 |
-
The model is a neural network trained on cancer patient data with the following features:
|
| 140 |
-
- Input: 23 patient characteristics
|
| 141 |
-
- Output: Risk classification (Low, Medium, High)
|
| 142 |
-
- Architecture: Multi-layer perceptron
|
| 143 |
-
|
| 144 |
-
## Usage
|
| 145 |
-
|
| 146 |
-
1. Adjust the sliders to input patient characteristics
|
| 147 |
-
2. The model will automatically predict the risk level
|
| 148 |
-
3. Example cases are provided for reference
|
| 149 |
-
|
| 150 |
-
## Technical Stack
|
| 151 |
-
|
| 152 |
-
- PyTorch: Neural network framework
|
| 153 |
-
- Gradio: Web interface
|
| 154 |
-
- Pandas & NumPy: Data processing
|
| 155 |
-
- Scikit-learn: Data preprocessing
|
| 156 |
-
|
| 157 |
-
## Dataset
|
| 158 |
-
|
| 159 |
-
The model uses the Cancer Patient Data Sets, which includes various patient characteristics and their corresponding risk levels.
|
| 160 |
-
|
| 161 |
-
## License
|
| 162 |
-
|
| 163 |
-
This project is licensed under the MIT License.
|
| 164 |
-
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Cancer Risk Prediction Model
|
| 3 |
+
emoji: π₯
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: red
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 3.50.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Cancer Risk Prediction Model
|
| 14 |
+
|
| 15 |
+
This Gradio web application predicts cancer risk levels (Low, Medium, High) based on patient characteristics using a neural network model.
|
| 16 |
+
|
| 17 |
+
## Model Details
|
| 18 |
+
|
| 19 |
+
The model is a neural network trained on cancer patient data with the following features:
|
| 20 |
+
- Input: 23 patient characteristics
|
| 21 |
+
- Output: Risk classification (Low, Medium, High)
|
| 22 |
+
- Architecture: Multi-layer perceptron
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
|
| 26 |
+
1. Adjust the sliders to input patient characteristics
|
| 27 |
+
2. The model will automatically predict the risk level
|
| 28 |
+
3. Example cases are provided for reference
|
| 29 |
+
|
| 30 |
+
## Technical Stack
|
| 31 |
+
|
| 32 |
+
- PyTorch: Neural network framework
|
| 33 |
+
- Gradio: Web interface
|
| 34 |
+
- Pandas & NumPy: Data processing
|
| 35 |
+
- Scikit-learn: Data preprocessing
|
| 36 |
+
|
| 37 |
+
## Dataset
|
| 38 |
+
|
| 39 |
+
The model uses the Cancer Patient Data Sets, which includes various patient characteristics and their corresponding risk levels.
|
| 40 |
+
|
| 41 |
+
## License
|
| 42 |
+
|
| 43 |
+
This project is licensed under the MIT License.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|