JeCabrera commited on
Commit
3190076
·
verified ·
1 Parent(s): b47012f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -99,11 +99,20 @@ def generate_headlines(number_of_headlines, target_audience, product, temperatur
99
  system_instruction="You are a world-class copywriter, with expertise in crafting hooks, headlines, and subject lines that immediately capture the reader's attention, prompting them to open the email or continue reading. Your skill lies in deeply understanding the emotions, desires, and challenges of a specific audience. You are also an expert in creating benefits that connect symptoms with problems, allowing you to design personalized strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and creating a powerful connection. Your task is to generate unusual, creative, and fascinating subject lines or headlines that spark curiosity and encourage the reader to engage further. Respond in Spanish and use a numbered list format. Important: Only answer with subject lines, never include explanations or categories, like this: 'La leyenda del padre soltero: Dice que nunca hay tiempo suficiente. El yoga te enseña a usar mejor el tiempo que tienes, incluso cuando te parece imposible (este bullet es curioso).'"
100
  )
101
 
102
- # Crear un mensaje para el modelo que incluye tipos específicos, pero no los menciona en la salida
103
  headlines_instruction = (
104
- f"Tu tarea es crear {number_of_headlines} ganchos o encabezados titulares llamativos diseñados para {target_audience} "
105
- f"con el fin de generar interés en {product}. Usa la siguiente mención: {mention_instruction}. "
106
- f"Asegúrate de utilizar la fórmula de titular seleccionada: {selected_formula['description']}. "
 
 
 
 
 
 
 
 
 
107
  )
108
 
109
  chat_session = model.start_chat(
 
99
  system_instruction="You are a world-class copywriter, with expertise in crafting hooks, headlines, and subject lines that immediately capture the reader's attention, prompting them to open the email or continue reading. Your skill lies in deeply understanding the emotions, desires, and challenges of a specific audience. You are also an expert in creating benefits that connect symptoms with problems, allowing you to design personalized strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and creating a powerful connection. Your task is to generate unusual, creative, and fascinating subject lines or headlines that spark curiosity and encourage the reader to engage further. Respond in Spanish and use a numbered list format. Important: Only answer with subject lines, never include explanations or categories, like this: 'La leyenda del padre soltero: Dice que nunca hay tiempo suficiente. El yoga te enseña a usar mejor el tiempo que tienes, incluso cuando te parece imposible (este bullet es curioso).'"
100
  )
101
 
102
+ # Crear un mensaje para el modelo, destacando la audiencia, el producto, la fórmula seleccionada y los ejemplos
103
  headlines_instruction = (
104
+ f"Tu tarea es crear {number_of_headlines} ganchos o encabezados atractivos diseñados para {target_audience}. "
105
+ f"El objetivo es captar la atención de inmediato y generar un gran interés en {product}. Asegúrate de que cada título sea "
106
+ f"llamativo, persuasivo y emocionalmente resonante, siguiendo la estructura de la fórmula seleccionada, que puedes ver a continuación: "
107
+ f"\n\n{selected_formula['description']}.\n\n"
108
+ f"Para hacer los titulares más efectivos, revisa los siguientes ejemplos de cómo esta fórmula puede ser utilizada con éxito:\n"
109
+ f"- {selected_formula['examples'][0]}\n"
110
+ f"- {selected_formula['examples'][1]}\n"
111
+ f"- {selected_formula['examples'][2]}\n\n"
112
+ f"Utiliza estos ejemplos como inspiración, pero asegúrate de crear titulares únicos y relevantes para {target_audience}. "
113
+ f"Además, incluye la siguiente mención en todos los titulares generados: {mention_instruction}. "
114
+ f"No expliques las fórmulas ni la estructura en la salida, solo proporciona los titulares. "
115
+ f"Recuerda, el objetivo es crear titulares que hagan que los lectores deseen saber más y actuar."
116
  )
117
 
118
  chat_session = model.start_chat(