Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,11 +159,11 @@ def predict(example_df,Kitchen_afternoon_illuminance, Lounge_night_illuminance,
|
|
| 159 |
|
| 160 |
statements = []
|
| 161 |
if proba[0][1] > 0.7814:
|
| 162 |
-
statements.append("There is a <span style='color: red; font-weight: bold;'>high
|
| 163 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 164 |
-
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium
|
| 165 |
if proba[0][1] <= 0.3225:
|
| 166 |
-
statements.append("There is a <span style='color: green; font-weight: bold;'>low
|
| 167 |
|
| 168 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
| 169 |
if feature_value > 0:
|
|
@@ -434,11 +434,11 @@ def update_data(example_df, Kitchen_afternoon_illuminance, Lounge_night_illumina
|
|
| 434 |
|
| 435 |
statements = []
|
| 436 |
if proba[0][1] > 0.7814:
|
| 437 |
-
statements.append("There is a <span style='color: red; font-weight: bold;'>high
|
| 438 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 439 |
-
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium
|
| 440 |
if proba[0][1] <= 0.3225:
|
| 441 |
-
statements.append("There is a <span style='color: green; font-weight: bold;'>low
|
| 442 |
|
| 443 |
|
| 444 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
|
@@ -745,11 +745,11 @@ def return_original(example_df):
|
|
| 745 |
statements = []
|
| 746 |
|
| 747 |
if proba[0][1] > 0.7814:
|
| 748 |
-
statements.append("There is a <span style='color: red; font-weight: bold;'>high
|
| 749 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 750 |
-
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium
|
| 751 |
if proba[0][1] <= 0.3225:
|
| 752 |
-
statements.append("There is a <span style='color: green; font-weight: bold;'>low
|
| 753 |
|
| 754 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
| 755 |
if feature_value > 0:
|
|
@@ -1003,7 +1003,7 @@ with gr.Blocks(theme=gr.themes.Default(spacing_size="md", primary_hue="red", sec
|
|
| 1003 |
gr.HTML("""
|
| 1004 |
<div style="margin-top: 20px; text-align: center;">
|
| 1005 |
<h1 style="font-size: 36px; font-weight: bold; color: #377eb8;">
|
| 1006 |
-
An Interpretable Machine Learning Tool for
|
| 1007 |
</h1>
|
| 1008 |
</div>
|
| 1009 |
""")
|
|
|
|
| 159 |
|
| 160 |
statements = []
|
| 161 |
if proba[0][1] > 0.7814:
|
| 162 |
+
statements.append("There is a <span style='color: red; font-weight: bold;'>high probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 163 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 164 |
+
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 165 |
if proba[0][1] <= 0.3225:
|
| 166 |
+
statements.append("There is a <span style='color: green; font-weight: bold;'>low probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 167 |
|
| 168 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
| 169 |
if feature_value > 0:
|
|
|
|
| 434 |
|
| 435 |
statements = []
|
| 436 |
if proba[0][1] > 0.7814:
|
| 437 |
+
statements.append("There is a <span style='color: red; font-weight: bold;'>high probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 438 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 439 |
+
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 440 |
if proba[0][1] <= 0.3225:
|
| 441 |
+
statements.append("There is a <span style='color: green; font-weight: bold;'>low probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 442 |
|
| 443 |
|
| 444 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
|
|
|
| 745 |
statements = []
|
| 746 |
|
| 747 |
if proba[0][1] > 0.7814:
|
| 748 |
+
statements.append("There is a <span style='color: red; font-weight: bold;'>high probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 749 |
if 0.3225 < proba[0][1] <= 0.7814:
|
| 750 |
+
statements.append("There is a <span style='color: orange; font-weight: bold;'>medium probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 751 |
if proba[0][1] <= 0.3225:
|
| 752 |
+
statements.append("There is a <span style='color: green; font-weight: bold;'>low probability estimate</span> that the patient was agitated the past week. During the previous week:")
|
| 753 |
|
| 754 |
for i, (shap_value, feature, feature_value) in enumerate(top_three_class_features):
|
| 755 |
if feature_value > 0:
|
|
|
|
| 1003 |
gr.HTML("""
|
| 1004 |
<div style="margin-top: 20px; text-align: center;">
|
| 1005 |
<h1 style="font-size: 36px; font-weight: bold; color: #377eb8;">
|
| 1006 |
+
An Interpretable Machine Learning Tool for In-Home Monitoring of Agitation Episodes in People Living with Dementia : a proof of concept study
|
| 1007 |
</h1>
|
| 1008 |
</div>
|
| 1009 |
""")
|