Update app.py
Browse files
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)
|