Spaces:
Runtime error
Runtime error
Commit
·
d03fc86
1
Parent(s):
896a005
"Numbers"
Browse files
app.py
CHANGED
@@ -36,33 +36,20 @@ examples = [
|
|
36 |
[72, 1, 3, 160, 114, 0, 0, 115, 0, 1.1, 2, 0, 7],
|
37 |
]
|
38 |
|
39 |
-
app = gr.Interface(fn=heart_disease,
|
40 |
gr.inputs.Number(label="Age"),
|
41 |
-
gr.inputs.
|
42 |
-
gr.inputs.
|
43 |
-
("Typical Angina", 0),
|
44 |
-
("Atypical Angina", 1),
|
45 |
-
("Non-Anginal Pain", 2),
|
46 |
-
("Asymptomatic", 3)
|
47 |
-
], label="Chest Pain Type"),
|
48 |
gr.inputs.Number(label="Resting Blood Pressure (mm Hg)"),
|
49 |
gr.inputs.Number(label="Serum Cholesterol Level (mg/dL)"),
|
50 |
-
gr.inputs.
|
51 |
-
gr.inputs.
|
52 |
-
("Normal", 0),
|
53 |
-
("ST-T Wave Abnormality", 1),
|
54 |
-
("Probable or Definite Left Ventricular Hypertrophy", 2)
|
55 |
-
], label="Resting Electrocardiographic Results"),
|
56 |
gr.inputs.Number(label="Maximum Heart Rate Achieved"),
|
57 |
-
gr.inputs.
|
58 |
gr.inputs.Number(label="ST Depression Induced by Exercise Relative to Rest"),
|
59 |
-
gr.inputs.
|
60 |
gr.inputs.Number(label="Number of Major Vessels (0-3) Colored by Fluoroscopy"),
|
61 |
-
gr.inputs.
|
62 |
-
("Normal", 3),
|
63 |
-
("Fixed Defect", 6),
|
64 |
-
("Reversible Defect", 7)
|
65 |
-
], label="Thalassemia")
|
66 |
], outputs=outputs, examples=examples,title="Heart Disease Prediction",description='''
|
67 |
This model predicts the presence of heart disease based on various input parameters. Please enter the values for the following inputs:
|
68 |
|
|
|
36 |
[72, 1, 3, 160, 114, 0, 0, 115, 0, 1.1, 2, 0, 7],
|
37 |
]
|
38 |
|
39 |
+
app = gr.Interface(fn=heart_disease, inputs=[
|
40 |
gr.inputs.Number(label="Age"),
|
41 |
+
gr.inputs.Number(label="Sex (0 for Female, 1 for Male)"),
|
42 |
+
gr.inputs.Number(label="Chest Pain Type (0 for Typical Angina, 1 for Atypical Angina, 2 for Non-Anginal Pain, 3 for Asymptomatic)"),
|
|
|
|
|
|
|
|
|
|
|
43 |
gr.inputs.Number(label="Resting Blood Pressure (mm Hg)"),
|
44 |
gr.inputs.Number(label="Serum Cholesterol Level (mg/dL)"),
|
45 |
+
gr.inputs.Number(label="Fasting Blood Sugar Level (0 for <= 120 mg/dL, 1 for > 120 mg/dL)"),
|
46 |
+
gr.inputs.Number(label="Resting Electrocardiographic Results (0 for Normal, 1 for ST-T Wave Abnormality, 2 for Probable or Definite Left Ventricular Hypertrophy)"),
|
|
|
|
|
|
|
|
|
47 |
gr.inputs.Number(label="Maximum Heart Rate Achieved"),
|
48 |
+
gr.inputs.Number(label="Exercise-Induced Angina (0 for No, 1 for Yes)"),
|
49 |
gr.inputs.Number(label="ST Depression Induced by Exercise Relative to Rest"),
|
50 |
+
gr.inputs.Number(label="Slope of the Peak Exercise ST Segment (0 for Upsloping, 1 for Flat, 2 for Downsloping)"),
|
51 |
gr.inputs.Number(label="Number of Major Vessels (0-3) Colored by Fluoroscopy"),
|
52 |
+
gr.inputs.Number(label="Thalassemia (3 for Normal, 6 for Fixed Defect, 7 for Reversible Defect)")
|
|
|
|
|
|
|
|
|
53 |
], outputs=outputs, examples=examples,title="Heart Disease Prediction",description='''
|
54 |
This model predicts the presence of heart disease based on various input parameters. Please enter the values for the following inputs:
|
55 |
|