GanymedeNil commited on
Commit
1ac43cd
1 Parent(s): c1bcda3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -17,6 +17,8 @@ import os
17
 
18
  # }
19
  def array_to_image_path(image_array):
 
 
20
  # Convert numpy array to PIL Image
21
  img = Image.fromarray(np.uint8(image_array))
22
 
 
17
 
18
  # }
19
  def array_to_image_path(image_array):
20
+ if image_array is None:
21
+ raise ValueError("No image provided. Please upload an image before submitting.")
22
  # Convert numpy array to PIL Image
23
  img = Image.fromarray(np.uint8(image_array))
24