Spaces:
Sleeping
Sleeping
Strip all emojis (link icon, warning markers, share icon)
Browse files
app.py
CHANGED
|
@@ -55,12 +55,12 @@ TITLE: dict[str, str] = {
|
|
| 55 |
"en": (
|
| 56 |
"# Chronic Wound Classifier — 4-class AZH demo\n"
|
| 57 |
"*Developed, trained, and deployed by **John Boby Mesadieu**.*\n\n"
|
| 58 |
-
f"
|
| 59 |
),
|
| 60 |
"fr": (
|
| 61 |
"# Classification des plaies chroniques — démo AZH 4 classes\n"
|
| 62 |
"*Conçu, entraîné et déployé par **John Boby Mesadieu**.*\n\n"
|
| 63 |
-
f"
|
| 64 |
),
|
| 65 |
}
|
| 66 |
|
|
@@ -161,13 +161,13 @@ LABELS: dict[str, dict[str, str]] = {
|
|
| 161 |
|
| 162 |
NOTE_LOW_CONFIDENCE: dict[str, str] = {
|
| 163 |
"en": (
|
| 164 |
-
"
|
| 165 |
"This often means the photo isn't a clear close-up of a wound, or the wound type "
|
| 166 |
'isn\'t one of the four the model was trained on. The model has no "not a wound" '
|
| 167 |
"option — it will always pick one of D / P / S / V even when the image isn't a wound."
|
| 168 |
),
|
| 169 |
"fr": (
|
| 170 |
-
"
|
| 171 |
"Cela indique souvent que la photo n'est pas un gros plan clair d'une plaie, ou "
|
| 172 |
"que le type de plaie ne fait pas partie des quatre sur lesquels le modèle a été entraîné. "
|
| 173 |
"Le modèle n'a pas d'option « ce n'est pas une plaie » — il choisira toujours D / P / S / V "
|
|
@@ -177,11 +177,11 @@ NOTE_LOW_CONFIDENCE: dict[str, str] = {
|
|
| 177 |
|
| 178 |
NOTE_PRESSURE: dict[str, str] = {
|
| 179 |
"en": (
|
| 180 |
-
"
|
| 181 |
"(~0.41 accuracy on the held-out test set). Treat this prediction with extra skepticism."
|
| 182 |
),
|
| 183 |
"fr": (
|
| 184 |
-
"
|
| 185 |
"(~0,41 d'exactitude sur le jeu de test retenu). Interpréter cette prédiction avec une "
|
| 186 |
"prudence accrue."
|
| 187 |
),
|
|
@@ -358,7 +358,7 @@ with gr.Blocks(theme=theme, title="Chronic Wound Classifier · Hôpital Montfort
|
|
| 358 |
with gr.Column():
|
| 359 |
label_output = gr.Label(num_top_classes=4, label=LABELS["en"]["label_output"])
|
| 360 |
notes_output = gr.Markdown(label=LABELS["en"]["notes_output"])
|
| 361 |
-
share_btn = gr.DeepLinkButton(value=LABELS["en"]["share"])
|
| 362 |
|
| 363 |
article_md = gr.Markdown(ARTICLE["en"])
|
| 364 |
|
|
|
|
| 55 |
"en": (
|
| 56 |
"# Chronic Wound Classifier — 4-class AZH demo\n"
|
| 57 |
"*Developed, trained, and deployed by **John Boby Mesadieu**.*\n\n"
|
| 58 |
+
f"**Share this demo:** [{SPACE_URL}]({SPACE_URL})"
|
| 59 |
),
|
| 60 |
"fr": (
|
| 61 |
"# Classification des plaies chroniques — démo AZH 4 classes\n"
|
| 62 |
"*Conçu, entraîné et déployé par **John Boby Mesadieu**.*\n\n"
|
| 63 |
+
f"**Partager cette démo :** [{SPACE_URL}]({SPACE_URL})"
|
| 64 |
),
|
| 65 |
}
|
| 66 |
|
|
|
|
| 161 |
|
| 162 |
NOTE_LOW_CONFIDENCE: dict[str, str] = {
|
| 163 |
"en": (
|
| 164 |
+
"**Low confidence** (top class {top_label} at {top_pct}). "
|
| 165 |
"This often means the photo isn't a clear close-up of a wound, or the wound type "
|
| 166 |
'isn\'t one of the four the model was trained on. The model has no "not a wound" '
|
| 167 |
"option — it will always pick one of D / P / S / V even when the image isn't a wound."
|
| 168 |
),
|
| 169 |
"fr": (
|
| 170 |
+
"**Faible confiance** (classe principale {top_label} à {top_pct}). "
|
| 171 |
"Cela indique souvent que la photo n'est pas un gros plan clair d'une plaie, ou "
|
| 172 |
"que le type de plaie ne fait pas partie des quatre sur lesquels le modèle a été entraîné. "
|
| 173 |
"Le modèle n'a pas d'option « ce n'est pas une plaie » — il choisira toujours D / P / S / V "
|
|
|
|
| 177 |
|
| 178 |
NOTE_PRESSURE: dict[str, str] = {
|
| 179 |
"en": (
|
| 180 |
+
"**Pressure-class predictions are the model's weak spot** "
|
| 181 |
"(~0.41 accuracy on the held-out test set). Treat this prediction with extra skepticism."
|
| 182 |
),
|
| 183 |
"fr": (
|
| 184 |
+
"**Les prédictions d'escarre sont le point faible du modèle** "
|
| 185 |
"(~0,41 d'exactitude sur le jeu de test retenu). Interpréter cette prédiction avec une "
|
| 186 |
"prudence accrue."
|
| 187 |
),
|
|
|
|
| 358 |
with gr.Column():
|
| 359 |
label_output = gr.Label(num_top_classes=4, label=LABELS["en"]["label_output"])
|
| 360 |
notes_output = gr.Markdown(label=LABELS["en"]["notes_output"])
|
| 361 |
+
share_btn = gr.DeepLinkButton(value=LABELS["en"]["share"], icon=None)
|
| 362 |
|
| 363 |
article_md = gr.Markdown(ARTICLE["en"])
|
| 364 |
|