userIdc2024 commited on
Commit
ba86243
·
verified ·
1 Parent(s): f6b6267

Update generator_function/image_function.py

Browse files
generator_function/image_function.py CHANGED
@@ -336,14 +336,7 @@ def generate_image(file_path, size, quality, category, sentiment, user_prompt, p
336
  raise RuntimeError("OPENAI_API_KEY is missing")
337
  client = OpenAI(api_key=api_key)
338
 
339
- if platform == "Google Display Network":
340
- size_messages = {0: "The aspect ratio of the image should be 1024x1024",
341
- 1: "The aspect ratio of the image should be 1536x1024.",
342
- 2: "The aspect ratio of the image should be 1024x1536."}
343
- img_size = size_messages.get(i, "")
344
- else:
345
- img_size = ""
346
-
347
  with open(file_path, "rb") as img_file:
348
  background = "blurred background." if blur else " not blurred background."
349
  result = client.images.edit(
 
336
  raise RuntimeError("OPENAI_API_KEY is missing")
337
  client = OpenAI(api_key=api_key)
338
 
339
+
 
 
 
 
 
 
 
340
  with open(file_path, "rb") as img_file:
341
  background = "blurred background." if blur else " not blurred background."
342
  result = client.images.edit(