Spaces:
Running
Running
Update app.py
Browse files
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
|