Spaces:
Running
Running
Nifemi Alpine Durin
commited on
Commit
·
710a8be
1
Parent(s):
46e3f65
add logo url
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ API_URL = os.environ.get("API_URL", "http://0.0.0.0:8021")
|
|
8 |
APP_ENV = os.environ.get("APP_ENV", None)
|
9 |
|
10 |
# Assuming the API returns an image URL in the response
|
11 |
-
def generate_image(brand_name, primary_color, secondary_color, description, target_audience, font, heading_text, sub_heading_text):
|
12 |
# Define your payload/data to send to the image generation API
|
13 |
data = {
|
14 |
"brand_name": brand_name,
|
@@ -18,7 +18,8 @@ def generate_image(brand_name, primary_color, secondary_color, description, targ
|
|
18 |
"target_audience": target_audience,
|
19 |
"font": font,
|
20 |
"heading_text": heading_text,
|
21 |
-
"sub_heading_text": sub_heading_text
|
|
|
22 |
}
|
23 |
|
24 |
# Make the API call
|
@@ -46,6 +47,7 @@ iface = gr.Interface(
|
|
46 |
gr.components.Textbox(value="Nova is an AI assistant", label="Description", lines=2),
|
47 |
gr.components.Textbox(value="Adults from 18 and above", label="Target Audience"),
|
48 |
gr.components.Textbox(value="Arial", label="Font"),
|
|
|
49 |
gr.components.Textbox(value="Nova Links Google Docs & Sheets", label="Heading Text"),
|
50 |
gr.components.Textbox(value="The seamless creation of documents and spreadsheets by the Nova AI assistant", label="Sub Heading Text")
|
51 |
],
|
|
|
8 |
APP_ENV = os.environ.get("APP_ENV", None)
|
9 |
|
10 |
# Assuming the API returns an image URL in the response
|
11 |
+
def generate_image(brand_name, primary_color, secondary_color, description, target_audience, font, logo_url, heading_text, sub_heading_text):
|
12 |
# Define your payload/data to send to the image generation API
|
13 |
data = {
|
14 |
"brand_name": brand_name,
|
|
|
18 |
"target_audience": target_audience,
|
19 |
"font": font,
|
20 |
"heading_text": heading_text,
|
21 |
+
"sub_heading_text": sub_heading_text,
|
22 |
+
"logo_url": logo_url
|
23 |
}
|
24 |
|
25 |
# Make the API call
|
|
|
47 |
gr.components.Textbox(value="Nova is an AI assistant", label="Description", lines=2),
|
48 |
gr.components.Textbox(value="Adults from 18 and above", label="Target Audience"),
|
49 |
gr.components.Textbox(value="Arial", label="Font"),
|
50 |
+
gr.components.Textbox(value="", label="Logo Url"),
|
51 |
gr.components.Textbox(value="Nova Links Google Docs & Sheets", label="Heading Text"),
|
52 |
gr.components.Textbox(value="The seamless creation of documents and spreadsheets by the Nova AI assistant", label="Sub Heading Text")
|
53 |
],
|