kedar-bhumkar commited on
Commit
3f87682
Β·
verified Β·
1 Parent(s): 1bcbcc1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -164
README.md CHANGED
@@ -1,164 +1,43 @@
1
- # Cancer Risk Prediction Model
2
-
3
- ## Overview
4
- This project implements a neural network-based model for predicting cancer risk levels based on patient characteristics and lifestyle factors. The model provides risk assessments through an interactive web interface, making it accessible for healthcare professionals.
5
-
6
- ## Features
7
- - Neural network model for cancer risk prediction
8
- - Interactive web interface for real-time predictions
9
- - Support for multiple patient characteristics and lifestyle factors
10
- - Pre-loaded example cases for reference
11
- - Real-time prediction updates
12
-
13
- ## Prerequisites
14
- - Python 3.8+
15
- - Required Python packages:
16
- ```bash
17
- pip install gradio numpy pandas torch scikit-learn
18
- ```
19
-
20
- ## Project Structure
21
- ```
22
- β”œβ”€β”€ code/
23
- β”‚ β”œβ”€β”€ gradio_interface.py # Web interface implementation
24
- β”‚ β”œβ”€β”€ ann_risk_inference.py # Model inference code
25
- β”‚ └── model_training.py # Model training code
26
- β”œβ”€β”€ dataset/
27
- β”‚ └── cancer_patient_data_sets.csv # Training dataset
28
- β”œβ”€β”€ models/
29
- β”‚ └── ann_model.pth # Trained model weights
30
- └── README.md
31
- ```
32
-
33
- ## Installation
34
-
35
- 1. Clone the repository:
36
- ```bash
37
- git clone [repository-url]
38
- cd cancer-risk-prediction
39
- ```
40
-
41
- 2. Install dependencies:
42
- ```bash
43
- pip install -r requirements.txt
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.