thliang01 commited on
Commit
6f88a8d
·
verified ·
1 Parent(s): 98b1f6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -34,10 +34,10 @@ def call_openai_image_api(prompt: str, api_key: str, input_image: Image.Image |
34
  size = "1024x1024"
35
 
36
  try:
37
- if input_image:
38
- # --- Image Editing ---
39
- if not isinstance(input_image, Image.Image):
40
- return None, None, "Error: Invalid image provided for editing."
41
 
42
  # Convert PIL Image to bytes for the API request
43
  byte_stream = io.BytesIO()
 
34
  size = "1024x1024"
35
 
36
  try:
37
+ if input_image:
38
+ # --- Image Editing ---
39
+ if not isinstance(input_image, Image.Image):
40
+ return None, None, "Error: Invalid image provided for editing."
41
 
42
  # Convert PIL Image to bytes for the API request
43
  byte_stream = io.BytesIO()