Spaces:
Sleeping
Sleeping
Improved more technical detail
Browse files
app.py
CHANGED
|
@@ -147,6 +147,16 @@ css = \
|
|
| 147 |
background-repeat: no-repeat;
|
| 148 |
background-size: 200px;
|
| 149 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
"""
|
| 151 |
|
| 152 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
@@ -213,7 +223,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 213 |
"""
|
| 214 |
)
|
| 215 |
result_pred = gr.Label(num_top_classes=2, label="Predicted")
|
| 216 |
-
result_label = gr.Label(label="Label")
|
| 217 |
|
| 218 |
with gr.Accordion("More on Patient Conditions...", open=False):
|
| 219 |
query_tbx = gr.Textbox(label="Enter one ICD-9 Diagnosis/Procedure Code or Lab Value:",
|
|
@@ -226,7 +236,20 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
| 226 |
query_tbx.change(fn=query_input_change_event, inputs=[query_tbx, query_type], outputs=[query_btn, html])
|
| 227 |
query_type.change(fn=query_input_change_event, inputs=[query_tbx, query_type], outputs=[query_btn, html])
|
| 228 |
query_btn.click(fn=do_query, inputs=[query_tbx, query_type], outputs=html)
|
| 229 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 230 |
|
| 231 |
for partialFunc in resDispPartFuncs:
|
| 232 |
partialFunc(outputs=[result_pred, result_label])
|
|
|
|
| 147 |
background-repeat: no-repeat;
|
| 148 |
background-size: 200px;
|
| 149 |
}
|
| 150 |
+
#label-label {
|
| 151 |
+
height: 50px !important;
|
| 152 |
+
}
|
| 153 |
+
#label-label > .container {
|
| 154 |
+
height: 50px !important;
|
| 155 |
+
}
|
| 156 |
+
#label-label > .container > h2 {
|
| 157 |
+
//height: 50px !important;
|
| 158 |
+
padding: 0 !important;
|
| 159 |
+
}
|
| 160 |
"""
|
| 161 |
|
| 162 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
|
|
| 223 |
"""
|
| 224 |
)
|
| 225 |
result_pred = gr.Label(num_top_classes=2, label="Predicted")
|
| 226 |
+
result_label = gr.Label(label="Label", elem_id="label-label")
|
| 227 |
|
| 228 |
with gr.Accordion("More on Patient Conditions...", open=False):
|
| 229 |
query_tbx = gr.Textbox(label="Enter one ICD-9 Diagnosis/Procedure Code or Lab Value:",
|
|
|
|
| 236 |
query_tbx.change(fn=query_input_change_event, inputs=[query_tbx, query_type], outputs=[query_btn, html])
|
| 237 |
query_type.change(fn=query_input_change_event, inputs=[query_tbx, query_type], outputs=[query_btn, html])
|
| 238 |
query_btn.click(fn=do_query, inputs=[query_tbx, query_type], outputs=html)
|
| 239 |
+
with gr.Accordion("More on technical details...", open=False):
|
| 240 |
+
gr.Markdown(
|
| 241 |
+
"""
|
| 242 |
+
- Paper: [Variationally Regularized Graph-based Representation Learning for Electronic Health Records (Zhu et al, 2021)](https://arxiv.org/abs/1912.03761)
|
| 243 |
+
- Dataset: [MIMIC-III](https://physionet.org/content/mimiciii/1.4/)
|
| 244 |
+
- 50,314 records, 10591 features
|
| 245 |
+
- 5,315 positive, 44,999 negative (11.8%)
|
| 246 |
+
- Split: 80% training, 10% validation, 10% testing
|
| 247 |
+
- Notable points:
|
| 248 |
+
- Result: AUPRC 0.7033 (>> 0.118)
|
| 249 |
+
- Variational Regularization, inspired by [Kipf et al., 2016](https://arxiv.org/abs/1611.07308)
|
| 250 |
+
- Trained on NVIDIA A100 with PyTorch 2.4.0
|
| 251 |
+
"""
|
| 252 |
+
)
|
| 253 |
|
| 254 |
for partialFunc in resDispPartFuncs:
|
| 255 |
partialFunc(outputs=[result_pred, result_label])
|