Deadmon commited on
Commit
0f84b00
1 Parent(s): 8d74463

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -208,6 +208,10 @@ def run(
208
  ) -> PIL.Image.Image:
209
  # Get the composite image from the EditorValue dict
210
  composite_image = image['composite']
 
 
 
 
211
  width, height = composite_image.size
212
 
213
  # Calculate new dimensions to fit within 1024x1024 while maintaining aspect ratio
 
208
  ) -> PIL.Image.Image:
209
  # Get the composite image from the EditorValue dict
210
  composite_image = image['composite']
211
+
212
+ if composite_image is None:
213
+ raise gr.Error("Please provide an input image.")
214
+
215
  width, height = composite_image.size
216
 
217
  # Calculate new dimensions to fit within 1024x1024 while maintaining aspect ratio