mertkarabacak
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -37,9 +37,7 @@ x1_valid = pd.DataFrame(x1_valid['train'])
|
|
37 |
print(x1_valid.columns)
|
38 |
|
39 |
#Define feature names.
|
40 |
-
f1_names =
|
41 |
-
f1_names = [f1.replace('__', ' - ') for f1 in f1_names]
|
42 |
-
f1_names = [f1.replace('_', ' ') for f1 in f1_names]
|
43 |
|
44 |
#Prepare training data for the outcome 1.
|
45 |
y1 = x1.pop('OUTCOME')
|
@@ -115,7 +113,7 @@ with gr.Blocks(title = "DMVO-mRS") as demo:
|
|
115 |
<br/>
|
116 |
<center><h2>NOT FOR CLINICAL USE</h2><center>
|
117 |
<br/>
|
118 |
-
<center><h1>DMVO 90-Day mRS</h1></center>
|
119 |
<center><h2>Prediction Tool</h2></center>
|
120 |
<br/>
|
121 |
<center><h3>This web application should not be used to guide any clinical decisions.</h3><center>
|
@@ -126,7 +124,7 @@ with gr.Blocks(title = "DMVO-mRS") as demo:
|
|
126 |
|
127 |
gr.Markdown(
|
128 |
"""
|
129 |
-
<center><h3>Model
|
130 |
<table style="margin-left: auto; margin-right: auto;">
|
131 |
<tr>
|
132 |
<th>Precision</th>
|
@@ -185,19 +183,19 @@ with gr.Blocks(title = "DMVO-mRS") as demo:
|
|
185 |
|
186 |
Admission_Hemoglobin = gr.Slider(label="Admission Hemoglobin", minimum = 5, maximum = 25, step = 0.1, value = 15)
|
187 |
|
188 |
-
Admission_NIHSS = gr.Slider(label="Admission NIHSS", minimum = 0, maximum = 42, step = 1, value = 1)
|
189 |
|
190 |
-
Premorbid_mRS = gr.Slider(label="Premorbid mRS", minimum = 0, maximum = 5, step = 1, value = 0)
|
191 |
|
192 |
Occlusion_Laterality = gr.Dropdown(label = "Occlusion_Laterality", choices = ['Left', 'Right'], type = 'index', value = 'Left')
|
193 |
|
194 |
Hyperdense_MCA = gr.Dropdown(label = "Hyperdense MCA", choices = ['No', 'Yes'], type = 'index', value = 'No')
|
195 |
|
196 |
-
IVTPA = gr.Dropdown(label = "
|
197 |
|
198 |
-
Type_of_Thrombectomy = gr.Dropdown(label = "Type of Thrombectomy", choices = ['MT not attempted', 'Direct aspiration', 'Stent retriever', 'Combined'], type = 'index', value = 'Stent retriever')
|
199 |
|
200 |
-
mTICI = gr.Dropdown(label = 'mTICI', choices = ['MT not attempted' '0', '1', '2a', '2b', '2c', '3'], type = 'index', value = '3')
|
201 |
|
202 |
with gr.Column():
|
203 |
|
|
|
37 |
print(x1_valid.columns)
|
38 |
|
39 |
#Define feature names.
|
40 |
+
f1_names = ['Age', 'Current or Former Smoker', 'History of Malignancy', 'Prior DVT or PE', 'Admission BMI', 'Admission NIHSS Score', 'Premorbid mRS Score','Occlusion Laterality', 'Hyperdense MCA', 'MT - Type of Thrombectomy', 'mTICI Score' ,'Hypertension', 'Intravenous Thrombolysis']
|
|
|
|
|
41 |
|
42 |
#Prepare training data for the outcome 1.
|
43 |
y1 = x1.pop('OUTCOME')
|
|
|
113 |
<br/>
|
114 |
<center><h2>NOT FOR CLINICAL USE</h2><center>
|
115 |
<br/>
|
116 |
+
<center><h1>DMVO 90-Day mRS Score</h1></center>
|
117 |
<center><h2>Prediction Tool</h2></center>
|
118 |
<br/>
|
119 |
<center><h3>This web application should not be used to guide any clinical decisions.</h3><center>
|
|
|
124 |
|
125 |
gr.Markdown(
|
126 |
"""
|
127 |
+
<center><h3>Model Performance</h3></center>
|
128 |
<table style="margin-left: auto; margin-right: auto;">
|
129 |
<tr>
|
130 |
<th>Precision</th>
|
|
|
183 |
|
184 |
Admission_Hemoglobin = gr.Slider(label="Admission Hemoglobin", minimum = 5, maximum = 25, step = 0.1, value = 15)
|
185 |
|
186 |
+
Admission_NIHSS = gr.Slider(label="Admission NIHSS Score", minimum = 0, maximum = 42, step = 1, value = 1)
|
187 |
|
188 |
+
Premorbid_mRS = gr.Slider(label="Premorbid mRS Score", minimum = 0, maximum = 5, step = 1, value = 0)
|
189 |
|
190 |
Occlusion_Laterality = gr.Dropdown(label = "Occlusion_Laterality", choices = ['Left', 'Right'], type = 'index', value = 'Left')
|
191 |
|
192 |
Hyperdense_MCA = gr.Dropdown(label = "Hyperdense MCA", choices = ['No', 'Yes'], type = 'index', value = 'No')
|
193 |
|
194 |
+
IVTPA = gr.Dropdown(label = "Intravenous Thrombolysis", choices = ['No', 'Yes'], type = 'index', value = 'No')
|
195 |
|
196 |
+
Type_of_Thrombectomy = gr.Dropdown(label = "MT - Type of Thrombectomy", choices = ['MT not attempted', 'Direct aspiration', 'Stent retriever', 'Combined'], type = 'index', value = 'Stent retriever')
|
197 |
|
198 |
+
mTICI = gr.Dropdown(label = 'MT - mTICI Score', choices = ['MT not attempted' '0', '1', '2a', '2b', '2c', '3'], type = 'index', value = '3')
|
199 |
|
200 |
with gr.Column():
|
201 |
|