Spaces:
Sleeping
Sleeping
Upload 23 files
Browse files
app/services/custom_banner_service.py
CHANGED
|
@@ -21,16 +21,37 @@ def get_custom_prompts(
|
|
| 21 |
"""
|
| 22 |
device_prompts = {
|
| 23 |
"desktop": [
|
| 24 |
-
f
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
],
|
|
|
|
| 27 |
"ipad": [
|
| 28 |
-
f
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
],
|
|
|
|
| 31 |
"mobile": [
|
| 32 |
-
f
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
],
|
| 35 |
}
|
| 36 |
return device_prompts
|
|
|
|
| 21 |
"""
|
| 22 |
device_prompts = {
|
| 23 |
"desktop": [
|
| 24 |
+
f'''Generate an abstract, wide-format banner (1440x500) for {domain} that incorporates: {description}.
|
| 25 |
+
Create a purely visual design with strong horizontal composition and centered elements.
|
| 26 |
+
Focus on expressing the description through abstract forms.
|
| 27 |
+
Do not include any text, writing, letters, numbers, or typographic elements anywhere in the image.''',
|
| 28 |
+
|
| 29 |
+
f'''Design a horizontal banner (1440x500) for {domain} reflecting: {description}.
|
| 30 |
+
Create a minimalist abstract interpretation with balanced horizontal layout.
|
| 31 |
+
Use visual elements to convey the description's essence.
|
| 32 |
+
Do not include any text, writing, letters, numbers, or typographic elements.'''
|
| 33 |
],
|
| 34 |
+
|
| 35 |
"ipad": [
|
| 36 |
+
f'''Generate a tablet banner (768x500) for {domain} space expressing: {description}.
|
| 37 |
+
Use pure abstract forms only—no text, writing, letters, numbers, or typographic elements whatsoever.
|
| 38 |
+
Design for dual-orientation impact with centered visual weight that captures the description's spirit.''',
|
| 39 |
+
|
| 40 |
+
f'''Create a tablet-optimized banner (768x500) for {domain} incorporating: {description}.
|
| 41 |
+
Design with abstract shapes that work in both orientations.
|
| 42 |
+
Absolutely no text, writing, letters, numbers, or typographic elements allowed.
|
| 43 |
+
Ensure balanced composition that reflects the description.'''
|
| 44 |
],
|
| 45 |
+
|
| 46 |
"mobile": [
|
| 47 |
+
f'''Create a vertical banner (375x500) for {domain} sector visualizing: {description}.
|
| 48 |
+
Use bold abstract shapes only, with zero text, writing, lettering, numbers, or typographic marks present.
|
| 49 |
+
Optimize visual hierarchy for narrow vertical viewing while maintaining the description's essence.''',
|
| 50 |
+
|
| 51 |
+
f'''Design a mobile-first banner (375x500) for {domain} expressing: {description}.
|
| 52 |
+
Focus on impactful abstract forms that work in narrow format.
|
| 53 |
+
Strictly no text, writing, letters, numbers, or typographic elements.
|
| 54 |
+
Create a strong vertical flow that captures the description's intent.'''
|
| 55 |
],
|
| 56 |
}
|
| 57 |
return device_prompts
|
app/services/custom_byop_service.py
CHANGED
|
@@ -24,13 +24,11 @@ def get_custom_byop_prompts(brand_name: str, domain: str, description: str) -> l
|
|
| 24 |
list[str]: List of prompts to send to the image generation API.
|
| 25 |
"""
|
| 26 |
prompts = [
|
| 27 |
-
f
|
| 28 |
-
|
| 29 |
-
"The image should be optimized for a 530x352 display while maintaining visual impact. DO NOT INCLUDE ANY TEXT, LETTERS, NUMBERS, OR TYPOGRAPHIC SYMBOLS.",
|
| 30 |
|
| 31 |
-
f
|
| 32 |
-
|
| 33 |
-
"Ensure the design works effectively in a 530x352 format. DO NOT INCLUDE ANY TEXT, LETTERS, NUMBERS, OR ANY WRITTEN LANGUAGE ELEMENTS IN THE IMAGE."
|
| 34 |
]
|
| 35 |
return prompts
|
| 36 |
|
|
|
|
| 24 |
list[str]: List of prompts to send to the image generation API.
|
| 25 |
"""
|
| 26 |
prompts = [
|
| 27 |
+
f'''Create a modern, customer-centric banner image capturing the sessence of the domain '{domain}' that incorporates this description: {description}.
|
| 28 |
+
The image should be optimized for a 530x352 display while maintaining visual impact.The image must not contain any text, writing, letters, numbers, symbols, or typographic elements.''',
|
|
|
|
| 29 |
|
| 30 |
+
f'''Design a contemporary banner based on the following concept: {description} and suitable for the {domain} industry. Use a modern color palette aligned with industry standards.
|
| 31 |
+
Ensure the design works effectively in a 530x352 format. The image must not contain any text, writing, letters, numbers, symbols, or typographic elements.'''
|
|
|
|
| 32 |
]
|
| 33 |
return prompts
|
| 34 |
|
app/services/custom_network_service.py
CHANGED
|
@@ -13,24 +13,13 @@ from app.utils.reach_upload import upload_to_reach
|
|
| 13 |
logger = logging.getLogger(__name__)
|
| 14 |
|
| 15 |
def get_custom_network_prompts(brand_name: str, domain: str, description: str) -> list[str]:
|
| 16 |
-
|
| 17 |
-
Generate prompts for network-related abstract banner generation without text.
|
| 18 |
-
|
| 19 |
-
Args:
|
| 20 |
-
domain (str): Industry domain.
|
| 21 |
-
description (str): Description to be incorporated in the banner design.
|
| 22 |
-
|
| 23 |
-
Returns:
|
| 24 |
-
list[str]: List of strict no-text prompts for image generation.
|
| 25 |
-
"""
|
| 26 |
prompts = [
|
| 27 |
-
f
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
"Create a bold, abstract representation. Incorporate subtle depth and dimension. "
|
| 33 |
-
"Ensure the design is effective at 530x352 resolution. STRICTLY NO TEXT, LETTERS, NUMBERS, SYMBOLS, OR ANY WRITTEN LANGUAGE ELEMENTS."
|
| 34 |
]
|
| 35 |
return prompts
|
| 36 |
|
|
|
|
| 13 |
logger = logging.getLogger(__name__)
|
| 14 |
|
| 15 |
def get_custom_network_prompts(brand_name: str, domain: str, description: str) -> list[str]:
|
| 16 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
prompts = [
|
| 18 |
+
f'''Create a modern banner image capturing the sessence of the domain '{domain}' that incorporates this description: {description}.
|
| 19 |
+
The image should be optimized for a 530x352 display while maintaining visual impact.The image must not contain any text, writing, letters, numbers, symbols, or typographic elements.''',
|
| 20 |
+
|
| 21 |
+
f'''Design a contemporary image based on the following concept: {description} and suitable for the '{domain}' industry. Use a modern color palette aligned with industry standards.
|
| 22 |
+
Ensure the design works effectively in a 530x352 format. The image must not contain any text, writing, letters, numbers, symbols, or typographic elements.'''
|
|
|
|
|
|
|
| 23 |
]
|
| 24 |
return prompts
|
| 25 |
|