Commit
Β·
0f3b1f1
1
Parent(s):
437e8c7
Update app.py
Browse files
app.py
CHANGED
@@ -34,11 +34,11 @@ def main_func(age, sex, cp, trtbps, chol, fbs, restecg, thalachh,exng,oldpeak,sl
|
|
34 |
return {"Low Chance": float(prob[0][0]), "High Chance": 1-float(prob[0][0])}, local_plot
|
35 |
|
36 |
# Create the UI
|
37 |
-
title = "**Heart Attack Predictor & Interpreter**
|
38 |
description1 = """This app takes info from subjects and predicts their heart attack likelihood. Do not use for medical diagnosis."""
|
39 |
|
40 |
description2 = """
|
41 |
-
To use the app, click on one of the examples
|
42 |
"""
|
43 |
|
44 |
with gr.Blocks(title=title) as demo:
|
@@ -67,9 +67,9 @@ with gr.Blocks(title=title) as demo:
|
|
67 |
|
68 |
with gr.Column():
|
69 |
thalachh = gr.Number(label="What is your maximum heart rate?", value=100)
|
70 |
-
exng = gr.Dropdown(label="exercise-induced angina", choices = ["yes","no"], type = "index", value = "
|
71 |
-
oldpeak = gr.Slider(label="ST depression induced by exercise relative to rest", minimum=0, maximum=10, value=
|
72 |
-
slp = gr.Dropdown(label="Slope of the peak exercise ST segment", choices = ["upsloping","flat","downsloping"], type = "index", value = "
|
73 |
caa = gr.Dropdown(label="Degree of coronary artery anomaly", choices = ["0","1","2","3","4"], type = "index", value = "1")
|
74 |
|
75 |
|
|
|
34 |
return {"Low Chance": float(prob[0][0]), "High Chance": 1-float(prob[0][0])}, local_plot
|
35 |
|
36 |
# Create the UI
|
37 |
+
title = "**Heart Attack Predictor & Interpreter** π€π«"
|
38 |
description1 = """This app takes info from subjects and predicts their heart attack likelihood. Do not use for medical diagnosis."""
|
39 |
|
40 |
description2 = """
|
41 |
+
To use the app, you can either click on one of the examples or adjust the values of the factors, and click on Analyze. π€
|
42 |
"""
|
43 |
|
44 |
with gr.Blocks(title=title) as demo:
|
|
|
67 |
|
68 |
with gr.Column():
|
69 |
thalachh = gr.Number(label="What is your maximum heart rate?", value=100)
|
70 |
+
exng = gr.Dropdown(label="exercise-induced angina", choices = ["yes","no"], type = "index", value = "yes")
|
71 |
+
oldpeak = gr.Slider(label="ST depression induced by exercise relative to rest", minimum=0, maximum=10, value=0, step=1)
|
72 |
+
slp = gr.Dropdown(label="Slope of the peak exercise ST segment", choices = ["upsloping","flat","downsloping"], type = "index", value = "flat")
|
73 |
caa = gr.Dropdown(label="Degree of coronary artery anomaly", choices = ["0","1","2","3","4"], type = "index", value = "1")
|
74 |
|
75 |
|