Spaces:
Running
Running
Nifemi Alpine Durin
commited on
Commit
·
c4fdee2
1
Parent(s):
2e415e8
patch
Browse files
app.py
CHANGED
@@ -22,7 +22,11 @@ def image_to_base64(file_path):
|
|
22 |
# Assuming the API returns an image URL in the response
|
23 |
def generate_image(brand_name, primary_color, secondary_color, description, target_audience, font, logo_image, heading_text, sub_heading_text, image_layout, custom_graphic_prompt):
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
26 |
|
27 |
# Define your payload/data to send to the image generation API
|
28 |
data = {
|
|
|
22 |
# Assuming the API returns an image URL in the response
|
23 |
def generate_image(brand_name, primary_color, secondary_color, description, target_audience, font, logo_image, heading_text, sub_heading_text, image_layout, custom_graphic_prompt):
|
24 |
|
25 |
+
if logo_image:
|
26 |
+
logo_base64 = image_to_base64(logo_image)
|
27 |
+
else:
|
28 |
+
logo_base64 = ""
|
29 |
+
|
30 |
|
31 |
# Define your payload/data to send to the image generation API
|
32 |
data = {
|