Update app.py
Browse files
app.py
CHANGED
@@ -214,33 +214,35 @@ def main():
|
|
214 |
with col1:
|
215 |
st.write("#### 🤖 KI-Diagnose")
|
216 |
|
217 |
-
st.
|
|
|
218 |
for pred in predictions_watcher:
|
219 |
-
if pred['score']
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
</
|
231 |
-
|
|
|
232 |
|
233 |
-
st.
|
|
|
234 |
for pred in predictions_master:
|
235 |
-
if pred['score']
|
236 |
-
|
237 |
-
|
238 |
-
<
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
""", unsafe_allow_html=True)
|
244 |
|
245 |
if max_fracture_score > 0:
|
246 |
st.write("#### 📊 Wahrscheinlichkeit")
|
|
|
214 |
with col1:
|
215 |
st.write("#### 🤖 KI-Diagnose")
|
216 |
|
217 |
+
st.markdown("#### 🛡️ KnochenWächter")
|
218 |
+
# Afficher tous les résultats de KnochenWächter
|
219 |
for pred in predictions_watcher:
|
220 |
+
confidence_color = '#0066cc' if pred['score'] > 0.7 else '#ffa500'
|
221 |
+
label_lower = pred['label'].lower()
|
222 |
+
# Mettre à jour max_fracture_score seulement pour les fractures
|
223 |
+
if pred['score'] >= conf_threshold and 'fracture' in label_lower:
|
224 |
+
has_fracture = True
|
225 |
+
max_fracture_score = max(max_fracture_score, pred['score'])
|
226 |
+
# Afficher tous les résultats
|
227 |
+
st.markdown(f"""
|
228 |
+
<div class="result-box" style="color: #1a1a1a;">
|
229 |
+
<span style="color: {confidence_color}; font-weight: 500;">
|
230 |
+
{pred['score']:.1%}
|
231 |
+
</span> - {translate_label(pred['label'])}
|
232 |
+
</div>
|
233 |
+
""", unsafe_allow_html=True)
|
234 |
|
235 |
+
st.markdown("#### 🎓 RöntgenMeister")
|
236 |
+
# Afficher tous les résultats de RöntgenMeister
|
237 |
for pred in predictions_master:
|
238 |
+
confidence_color = '#0066cc' if pred['score'] > 0.7 else '#ffa500'
|
239 |
+
st.markdown(f"""
|
240 |
+
<div class="result-box" style="color: #1a1a1a;">
|
241 |
+
<span style="color: {confidence_color}; font-weight: 500;">
|
242 |
+
{pred['score']:.1%}
|
243 |
+
</span> - {translate_label(pred['label'])}
|
244 |
+
</div>
|
245 |
+
""", unsafe_allow_html=True)
|
|
|
246 |
|
247 |
if max_fracture_score > 0:
|
248 |
st.write("#### 📊 Wahrscheinlichkeit")
|