Spaces:
Sleeping
Sleeping
Upload 11 files
Browse files- ad_objectives.py +107 -7
- app.py +0 -2
- prompts.py +36 -1
ad_objectives.py
CHANGED
|
@@ -9,36 +9,136 @@ ad_objectives = {
|
|
| 9 |
"name": "Reconocimiento",
|
| 10 |
"description": "Increase your brand visibility and reach people more likely to remember it",
|
| 11 |
"key_metrics": ["Reach", "Impressions", "Ad recall lift", "Video plays"],
|
| 12 |
-
"copy_strategy": "Use memorable messages that highlight brand identity, create content with visual and emotional impact, and emphasize what makes the brand unique"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
},
|
| 14 |
"Tráfico": {
|
| 15 |
"name": "Tráfico",
|
| 16 |
"description": "Direct people to a specific destination such as website, Facebook page, Instagram store or app",
|
| 17 |
"key_metrics": ["Link clicks", "Page views", "Daily unique reach", "Impressions"],
|
| 18 |
-
"copy_strategy": "Include clear and direct CTAs, create urgency to visit the destination, highlight the value they'll find when clicking, and use language that invites immediate action"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
},
|
| 20 |
"Interacción": {
|
| 21 |
"name": "Interacción",
|
| 22 |
"description": "Promote interactions with your page, posts, videos or start conversations in Messenger",
|
| 23 |
"key_metrics": ["Page interactions", "Post interactions", "Video plays", "Messages"],
|
| 24 |
-
"copy_strategy": "Ask intriguing questions, invite people to share opinions, create content that generates discussion, and use a conversational tone that encourages participation"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
},
|
| 26 |
"Clientes potenciales": {
|
| 27 |
"name": "Clientes potenciales",
|
| 28 |
"description": "Collect contact information from people interested in your business through forms",
|
| 29 |
"key_metrics": ["Lead generation", "Messages", "Conversions", "Cost per lead"],
|
| 30 |
-
"copy_strategy": "Offer clear value in exchange for contact information, highlight exclusive benefits, minimize risk perception, and create a sense of limited opportunity"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
},
|
| 32 |
"Promoción de la app": {
|
| 33 |
"name": "Promoción de la app",
|
| 34 |
"description": "Increase installations and specific actions within your mobile application",
|
| 35 |
"key_metrics": ["App installations", "App actions", "Cost per installation"],
|
| 36 |
-
"copy_strategy": "Highlight the app's unique features, emphasize ease of use, show attractive screenshots, and clearly communicate the problem the app solves"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
},
|
| 38 |
"Ventas": {
|
| 39 |
"name": "Ventas",
|
| 40 |
"description": "Maximize conversions and sales on your website, app, or Facebook or Instagram store",
|
| 41 |
"key_metrics": ["Conversions", "Catalog sales", "Average order value", "ROAS"],
|
| 42 |
-
"copy_strategy": "Emphasize irresistible offers, create a sense of scarcity or urgency, highlight testimonials from satisfied customers, and eliminate purchase objections with clear guarantees"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 44 |
-
}
|
|
|
|
| 9 |
"name": "Reconocimiento",
|
| 10 |
"description": "Increase your brand visibility and reach people more likely to remember it",
|
| 11 |
"key_metrics": ["Reach", "Impressions", "Ad recall lift", "Video plays"],
|
| 12 |
+
"copy_strategy": "Use memorable messages that highlight brand identity, create content with visual and emotional impact, and emphasize what makes the brand unique",
|
| 13 |
+
"headline_examples": [
|
| 14 |
+
"¿Sabías que 7 de cada 10 personas luchan con...?",
|
| 15 |
+
"La verdad sobre [tema] que nadie te cuenta",
|
| 16 |
+
"Descubre por qué [problema] afecta a tantos [público objetivo]"
|
| 17 |
+
],
|
| 18 |
+
"avoid": [
|
| 19 |
+
"Plazas limitadas",
|
| 20 |
+
"Oferta por tiempo limitado",
|
| 21 |
+
"Únete ahora",
|
| 22 |
+
"No te lo pierdas",
|
| 23 |
+
"Exclusividad o acceso restringido",
|
| 24 |
+
"Urgencia para comprar"
|
| 25 |
+
],
|
| 26 |
+
"recommended_ctas": [
|
| 27 |
+
"Descubre más",
|
| 28 |
+
"Conoce cómo",
|
| 29 |
+
"Aprende sobre",
|
| 30 |
+
"Explora las posibilidades"
|
| 31 |
+
],
|
| 32 |
+
"tone": "Educativo, informativo, conversacional - sin presión de venta"
|
| 33 |
},
|
| 34 |
"Tráfico": {
|
| 35 |
"name": "Tráfico",
|
| 36 |
"description": "Direct people to a specific destination such as website, Facebook page, Instagram store or app",
|
| 37 |
"key_metrics": ["Link clicks", "Page views", "Daily unique reach", "Impressions"],
|
| 38 |
+
"copy_strategy": "Include clear and direct CTAs, create urgency to visit the destination, highlight the value they'll find when clicking, and use language that invites immediate action",
|
| 39 |
+
"headline_examples": [
|
| 40 |
+
"Cómo [producto/servicio] está cambiando la forma en que [público objetivo] aborda [problema]",
|
| 41 |
+
"3 razones por las que deberías conocer más sobre [tema/producto]",
|
| 42 |
+
"Descubre la solución que está transformando [industria/actividad]"
|
| 43 |
+
],
|
| 44 |
+
"avoid": [
|
| 45 |
+
"Lenguaje de venta agresivo",
|
| 46 |
+
"Enfoque excesivo en compra inmediata"
|
| 47 |
+
],
|
| 48 |
+
"recommended_ctas": [
|
| 49 |
+
"Visita nuestra página",
|
| 50 |
+
"Descubre más aquí",
|
| 51 |
+
"Haz clic para ver",
|
| 52 |
+
"Conoce todos los detalles"
|
| 53 |
+
],
|
| 54 |
+
"tone": "Curioso, interesante, que genere interés sin presionar a la compra"
|
| 55 |
},
|
| 56 |
"Interacción": {
|
| 57 |
"name": "Interacción",
|
| 58 |
"description": "Promote interactions with your page, posts, videos or start conversations in Messenger",
|
| 59 |
"key_metrics": ["Page interactions", "Post interactions", "Video plays", "Messages"],
|
| 60 |
+
"copy_strategy": "Ask intriguing questions, invite people to share opinions, create content that generates discussion, and use a conversational tone that encourages participation",
|
| 61 |
+
"headline_examples": [
|
| 62 |
+
"¿Qué opinas sobre [tema controversial relacionado]?",
|
| 63 |
+
"¿Te has preguntado alguna vez por qué [pregunta intrigante]?",
|
| 64 |
+
"Comparte tu experiencia con [tema/situación]"
|
| 65 |
+
],
|
| 66 |
+
"avoid": [
|
| 67 |
+
"Contenido que no invite a comentar o participar",
|
| 68 |
+
"Mensajes unidireccionales sin preguntas"
|
| 69 |
+
],
|
| 70 |
+
"recommended_ctas": [
|
| 71 |
+
"Comparte tu opinión",
|
| 72 |
+
"Cuéntanos tu experiencia",
|
| 73 |
+
"¿Estás de acuerdo?",
|
| 74 |
+
"Comenta qué piensas"
|
| 75 |
+
],
|
| 76 |
+
"tone": "Conversacional, abierto al diálogo, que invite a la participación"
|
| 77 |
},
|
| 78 |
"Clientes potenciales": {
|
| 79 |
"name": "Clientes potenciales",
|
| 80 |
"description": "Collect contact information from people interested in your business through forms",
|
| 81 |
"key_metrics": ["Lead generation", "Messages", "Conversions", "Cost per lead"],
|
| 82 |
+
"copy_strategy": "Offer clear value in exchange for contact information, highlight exclusive benefits, minimize risk perception, and create a sense of limited opportunity",
|
| 83 |
+
"headline_examples": [
|
| 84 |
+
"Descarga gratis: [recurso valioso] para [público objetivo]",
|
| 85 |
+
"Accede a [beneficio específico] - Solo necesitamos tu email",
|
| 86 |
+
"[Número] consejos exclusivos para [resolver problema] - Regístrate ahora"
|
| 87 |
+
],
|
| 88 |
+
"avoid": [
|
| 89 |
+
"No mencionar el valor que recibirán",
|
| 90 |
+
"Solicitar demasiada información personal"
|
| 91 |
+
],
|
| 92 |
+
"recommended_ctas": [
|
| 93 |
+
"Descarga gratis",
|
| 94 |
+
"Obtén acceso",
|
| 95 |
+
"Regístrate ahora",
|
| 96 |
+
"Recibe tu [recurso/guía/informe]"
|
| 97 |
+
],
|
| 98 |
+
"tone": "Generoso, que ofrezca valor claro, con moderada sensación de oportunidad"
|
| 99 |
},
|
| 100 |
"Promoción de la app": {
|
| 101 |
"name": "Promoción de la app",
|
| 102 |
"description": "Increase installations and specific actions within your mobile application",
|
| 103 |
"key_metrics": ["App installations", "App actions", "Cost per installation"],
|
| 104 |
+
"copy_strategy": "Highlight the app's unique features, emphasize ease of use, show attractive screenshots, and clearly communicate the problem the app solves",
|
| 105 |
+
"headline_examples": [
|
| 106 |
+
"La app que está revolucionando cómo [público objetivo] [actividad/problema]",
|
| 107 |
+
"Simplifica tu [actividad diaria] con esta app - Descárgala gratis",
|
| 108 |
+
"[Beneficio principal] en la palma de tu mano - Nueva app para [público objetivo]"
|
| 109 |
+
],
|
| 110 |
+
"avoid": [
|
| 111 |
+
"No mostrar la interfaz o beneficios visuales",
|
| 112 |
+
"Complicar el proceso de descarga"
|
| 113 |
+
],
|
| 114 |
+
"recommended_ctas": [
|
| 115 |
+
"Descarga ahora",
|
| 116 |
+
"Pruébala gratis",
|
| 117 |
+
"Instala la app",
|
| 118 |
+
"Disponible en App Store/Google Play"
|
| 119 |
+
],
|
| 120 |
+
"tone": "Práctico, enfocado en beneficios, que destaque la facilidad de uso"
|
| 121 |
},
|
| 122 |
"Ventas": {
|
| 123 |
"name": "Ventas",
|
| 124 |
"description": "Maximize conversions and sales on your website, app, or Facebook or Instagram store",
|
| 125 |
"key_metrics": ["Conversions", "Catalog sales", "Average order value", "ROAS"],
|
| 126 |
+
"copy_strategy": "Emphasize irresistible offers, create a sense of scarcity or urgency, highlight testimonials from satisfied customers, and eliminate purchase objections with clear guarantees",
|
| 127 |
+
"headline_examples": [
|
| 128 |
+
"Solo quedan 5 plazas: Transforma tu [beneficio principal] en solo [tiempo]",
|
| 129 |
+
"Última oportunidad: [Oferta específica] termina esta semana",
|
| 130 |
+
"[Resultado específico] garantizado o te devolvemos tu dinero"
|
| 131 |
+
],
|
| 132 |
+
"avoid": [
|
| 133 |
+
"Mensajes vagos sin oferta clara",
|
| 134 |
+
"Falta de prueba social o testimonios"
|
| 135 |
+
],
|
| 136 |
+
"recommended_ctas": [
|
| 137 |
+
"Compra ahora",
|
| 138 |
+
"Asegura tu plaza",
|
| 139 |
+
"Aprovecha esta oferta",
|
| 140 |
+
"Añadir al carrito"
|
| 141 |
+
],
|
| 142 |
+
"tone": "Persuasivo, con sentido de urgencia, enfocado en la acción inmediata"
|
| 143 |
}
|
| 144 |
+
}
|
app.py
CHANGED
|
@@ -193,8 +193,6 @@ with col1:
|
|
| 193 |
)
|
| 194 |
selected_objective = ad_objectives[ad_objective_key] if ad_objective_key != "ninguno" else None
|
| 195 |
|
| 196 |
-
# Removed language selector
|
| 197 |
-
|
| 198 |
ad_temperature = st.slider(
|
| 199 |
"Nivel de creatividad",
|
| 200 |
min_value=0.0,
|
|
|
|
| 193 |
)
|
| 194 |
selected_objective = ad_objectives[ad_objective_key] if ad_objective_key != "ninguno" else None
|
| 195 |
|
|
|
|
|
|
|
| 196 |
ad_temperature = st.slider(
|
| 197 |
"Nivel de creatividad",
|
| 198 |
min_value=0.0,
|
prompts.py
CHANGED
|
@@ -48,9 +48,44 @@ def create_fb_ad_instruction(target_audience, product, selected_formula, selecte
|
|
| 48 |
Key metrics to optimize for:
|
| 49 |
- {', '.join(ad_objective['key_metrics'])}
|
| 50 |
|
| 51 |
-
|
| 52 |
- {ad_objective['copy_strategy']}
|
| 53 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
# Create story prompt instruction if provided
|
| 56 |
story_instruction = ""
|
|
|
|
| 48 |
Key metrics to optimize for:
|
| 49 |
- {', '.join(ad_objective['key_metrics'])}
|
| 50 |
|
| 51 |
+
Copy strategy:
|
| 52 |
- {ad_objective['copy_strategy']}
|
| 53 |
"""
|
| 54 |
+
|
| 55 |
+
# Add headline examples if available
|
| 56 |
+
if 'headline_examples' in ad_objective:
|
| 57 |
+
headline_examples = "\n- ".join(ad_objective['headline_examples'])
|
| 58 |
+
objective_instruction += f"""
|
| 59 |
+
|
| 60 |
+
Recommended headline approaches for this objective:
|
| 61 |
+
- {headline_examples}
|
| 62 |
+
"""
|
| 63 |
+
|
| 64 |
+
# Add elements to avoid if available
|
| 65 |
+
if 'avoid' in ad_objective:
|
| 66 |
+
elements_to_avoid = "\n- ".join(ad_objective['avoid'])
|
| 67 |
+
objective_instruction += f"""
|
| 68 |
+
|
| 69 |
+
Elements to AVOID for this objective:
|
| 70 |
+
- {elements_to_avoid}
|
| 71 |
+
"""
|
| 72 |
+
|
| 73 |
+
# Add recommended CTAs if available
|
| 74 |
+
if 'recommended_ctas' in ad_objective:
|
| 75 |
+
recommended_ctas = "\n- ".join(ad_objective['recommended_ctas'])
|
| 76 |
+
objective_instruction += f"""
|
| 77 |
+
|
| 78 |
+
Recommended CTAs for this objective:
|
| 79 |
+
- {recommended_ctas}
|
| 80 |
+
"""
|
| 81 |
+
|
| 82 |
+
# Add tone guidance if available
|
| 83 |
+
if 'tone' in ad_objective:
|
| 84 |
+
objective_instruction += f"""
|
| 85 |
+
|
| 86 |
+
Recommended tone for this objective:
|
| 87 |
+
{ad_objective['tone']}
|
| 88 |
+
"""
|
| 89 |
|
| 90 |
# Create story prompt instruction if provided
|
| 91 |
story_instruction = ""
|