Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,6 +19,9 @@ def preprocess_image(image):
|
|
| 19 |
|
| 20 |
# Prediction function
|
| 21 |
def predict_cervical_image(image):
|
|
|
|
|
|
|
|
|
|
| 22 |
img_array = preprocess_image(image)
|
| 23 |
prediction = model.predict(img_array)[0][0] # assuming output is single sigmoid neuron
|
| 24 |
|
|
|
|
| 19 |
|
| 20 |
# Prediction function
|
| 21 |
def predict_cervical_image(image):
|
| 22 |
+
if image is None:
|
| 23 |
+
print("⚠️ Skipped empty call (no image uploaded yet)")
|
| 24 |
+
return "Please upload a cervical image first."
|
| 25 |
img_array = preprocess_image(image)
|
| 26 |
prediction = model.predict(img_array)[0][0] # assuming output is single sigmoid neuron
|
| 27 |
|