som11 commited on
Commit
3d454a1
1 Parent(s): aa6f0f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -29,6 +29,11 @@ class_names = ['cloudy', 'desert', 'green_area', 'water']
29
 
30
  def predict_image(file_path):
31
 
 
 
 
 
 
32
  with open(file_path, "rb") as f:
33
 
34
  imageUploadedByUser = Image.open(f)
 
29
 
30
  def predict_image(file_path):
31
 
32
+ if file_path is None:
33
+
34
+ return "Please upload a satellite image for prediction"
35
+
36
+
37
  with open(file_path, "rb") as f:
38
 
39
  imageUploadedByUser = Image.open(f)