onlyshrey98 commited on
Commit
40ded74
·
verified ·
1 Parent(s): 05bd64c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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