Update app.py
Browse files
app.py
CHANGED
@@ -85,6 +85,16 @@ body {
|
|
85 |
margin-bottom: 10px;
|
86 |
}
|
87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
/* Clearfix pour les flottants */
|
89 |
.clearfix::after {
|
90 |
content: "";
|
@@ -93,9 +103,6 @@ body {
|
|
93 |
}
|
94 |
"""
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
# Désactiver GPU et logs TensorFlow
|
100 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
101 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
@@ -535,7 +542,8 @@ def quick_predict_ui(image_pil):
|
|
535 |
<div>
|
536 |
<span style="font-size:16px;font-weight:bold;">Diagnostic Global</span><br>
|
537 |
<div class="highlight benin">
|
538 |
-
{global_diag} : {ensemble_probs[top_class_idx]*100:.2f}%
|
|
|
539 |
</div>
|
540 |
</div>
|
541 |
</div>
|
@@ -556,7 +564,6 @@ def quick_predict_ui(image_pil):
|
|
556 |
'''
|
557 |
warning_visible = True
|
558 |
|
559 |
-
# Génération du graphique
|
560 |
# Génération du graphique
|
561 |
df = pd.DataFrame.from_dict(
|
562 |
{CLASS_NAMES[i]: float(ensemble_probs[i]*100) for i in range(len(CLASS_NAMES))},
|
@@ -568,7 +575,7 @@ def quick_predict_ui(image_pil):
|
|
568 |
color_continuous_scale=px.colors.sequential.Viridis,
|
569 |
title="Probabilités par classe", text="Pourcentage")
|
570 |
fig.update_traces(textposition="outside") # Forcer le texte à l'extérieur pour toutes les barres
|
571 |
-
fig.update_layout(xaxis_title="", yaxis_title="Probabilité (%)", height=
|
572 |
|
573 |
return (
|
574 |
global_diag_html,
|
|
|
85 |
margin-bottom: 10px;
|
86 |
}
|
87 |
|
88 |
+
.feedback-container {
|
89 |
+
background-color: #f9f9f9;
|
90 |
+
border-radius: 5px;
|
91 |
+
padding: 10px;
|
92 |
+
margin-bottom: 15px;
|
93 |
+
border: 1px solid #e0e0e0;
|
94 |
+
font-size:16px;
|
95 |
+
font-family: Arial, sans-serif !important;
|
96 |
+
}
|
97 |
+
|
98 |
/* Clearfix pour les flottants */
|
99 |
.clearfix::after {
|
100 |
content: "";
|
|
|
103 |
}
|
104 |
"""
|
105 |
|
|
|
|
|
|
|
106 |
# Désactiver GPU et logs TensorFlow
|
107 |
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
|
108 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
|
|
542 |
<div>
|
543 |
<span style="font-size:16px;font-weight:bold;">Diagnostic Global</span><br>
|
544 |
<div class="highlight benin">
|
545 |
+
{global_diag} : {ensemble_probs[top_class_idx]*100:.2f}% <br>
|
546 |
+
➜ {top_class_name.upper()}
|
547 |
</div>
|
548 |
</div>
|
549 |
</div>
|
|
|
564 |
'''
|
565 |
warning_visible = True
|
566 |
|
|
|
567 |
# Génération du graphique
|
568 |
df = pd.DataFrame.from_dict(
|
569 |
{CLASS_NAMES[i]: float(ensemble_probs[i]*100) for i in range(len(CLASS_NAMES))},
|
|
|
575 |
color_continuous_scale=px.colors.sequential.Viridis,
|
576 |
title="Probabilités par classe", text="Pourcentage")
|
577 |
fig.update_traces(textposition="outside") # Forcer le texte à l'extérieur pour toutes les barres
|
578 |
+
fig.update_layout(xaxis_title="", yaxis_title="Probabilité (%)", height=400)
|
579 |
|
580 |
return (
|
581 |
global_diag_html,
|