Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,15 +40,11 @@ def classify_images(img_ultrasound=None, img_oct=None, img_fundus=None, img_fluo
|
|
40 |
else:
|
41 |
detailed_predictions.append(f"{key}: No image provided")
|
42 |
|
43 |
-
#
|
44 |
-
if predictions:
|
45 |
-
final_decision = max(set(predictions), key=predictions.count)
|
46 |
-
detailed_predictions.append(f"Final Decision: {final_decision}")
|
47 |
-
else:
|
48 |
-
detailed_predictions.append("No final decision (Insufficient data)")
|
49 |
|
50 |
return "\n".join(detailed_predictions)
|
51 |
|
|
|
52 |
# Define the Gradio interface inputs and outputs
|
53 |
inputs = [gr.Image(label=f"{modality} Image", optional=True) for modality in modality_keys]
|
54 |
output = gr.Text(label="Predictions")
|
|
|
40 |
else:
|
41 |
detailed_predictions.append(f"{key}: No image provided")
|
42 |
|
43 |
+
# Handle final decision logic here as needed
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
return "\n".join(detailed_predictions)
|
46 |
|
47 |
+
|
48 |
# Define the Gradio interface inputs and outputs
|
49 |
inputs = [gr.Image(label=f"{modality} Image", optional=True) for modality in modality_keys]
|
50 |
output = gr.Text(label="Predictions")
|