Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ def generate_content(prompt_instructions, temperature):
|
|
118 |
# Refactorizar la función generate_webinar_names para que acepte los mismos parámetros que generate_webinar_script
|
119 |
def generate_webinar_names(audience, topic, temperature, selected_formula, number_of_names=5, selected_angle=None, **kwargs):
|
120 |
# Incluir las instrucciones del sistema en el prompt principal
|
121 |
-
system_prompt = """You are a world-class copywriter, with expertise in crafting compelling webinar titles that immediately capture the audience's attention and drive registrations.
|
122 |
|
123 |
FORMAT RULES:
|
124 |
- Each webinar name must start with number and period
|
@@ -126,7 +126,7 @@ FORMAT RULES:
|
|
126 |
- No explanations or categories
|
127 |
- Add a line break between each name
|
128 |
- Avoid unnecessary : symbols
|
129 |
-
- Each webinar name must be a complete and
|
130 |
- WRITE ALL WEBINAR NAMES IN SPANISH
|
131 |
|
132 |
FORMAT EXAMPLE:
|
@@ -141,12 +141,13 @@ FORMAT EXAMPLE:
|
|
141 |
5. Nombre del Webinar 5.
|
142 |
|
143 |
IMPORTANT:
|
144 |
-
- Each webinar name must be unique and
|
145 |
-
-
|
146 |
-
-
|
|
|
147 |
- Adapt speaking language from the audience
|
148 |
-
- Focus on transformative benefits
|
149 |
-
- Follow the selected formula structure
|
150 |
- WRITE ALL WEBINAR NAMES IN SPANISH"""
|
151 |
|
152 |
# Iniciar el prompt con las instrucciones del sistema
|
@@ -172,32 +173,40 @@ SUCCESSFUL EXAMPLES OF THE {selected_angle} ANGLE:
|
|
172 |
|
173 |
# Instrucciones específicas para la tarea
|
174 |
webinar_names_instruction += (
|
175 |
-
f"\nYour task is to create {number_of_names} irresistible webinar names for {audience} "
|
176 |
f"that instantly capture attention and generate registrations for a webinar about {topic}. "
|
177 |
-
f"Focus on awakening genuine
|
178 |
f"\n\n"
|
179 |
-
f"IMPORTANT:
|
180 |
-
f"Each example represents
|
181 |
f":\n\n"
|
182 |
)
|
183 |
|
184 |
# Agregar ejemplos aleatorios de la fórmula (keeping examples in Spanish)
|
185 |
random_examples = random.sample(selected_formula['examples'], min(5, len(selected_formula['examples'])))
|
186 |
-
webinar_names_instruction += "EXAMPLES OF THE FORMULA TO FOLLOW:\n"
|
187 |
for i, example in enumerate(random_examples, 1):
|
188 |
webinar_names_instruction += f"{i}. {example}\n"
|
189 |
|
190 |
# Instrucciones específicas (translated to English)
|
191 |
webinar_names_instruction += "\nSPECIFIC INSTRUCTIONS:\n"
|
192 |
-
webinar_names_instruction += "1.
|
193 |
-
webinar_names_instruction += "2.
|
194 |
-
webinar_names_instruction += "3.
|
195 |
-
webinar_names_instruction += "4.
|
196 |
-
webinar_names_instruction += f"5. Adapt the content for {audience} while
|
197 |
-
webinar_names_instruction += f"FORMULA TO FOLLOW:\n{selected_formula['description']}\n\n"
|
198 |
webinar_names_instruction += f"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
GENERATE NOW:
|
200 |
-
Create {number_of_names} webinar names that
|
201 |
"""
|
202 |
|
203 |
# Enviar el mensaje al modelo
|
|
|
118 |
# Refactorizar la función generate_webinar_names para que acepte los mismos parámetros que generate_webinar_script
|
119 |
def generate_webinar_names(audience, topic, temperature, selected_formula, number_of_names=5, selected_angle=None, **kwargs):
|
120 |
# Incluir las instrucciones del sistema en el prompt principal
|
121 |
+
system_prompt = """You are a world-class copywriter, with expertise in crafting compelling and disruptive webinar titles that immediately capture the audience's attention and drive registrations.
|
122 |
|
123 |
FORMAT RULES:
|
124 |
- Each webinar name must start with number and period
|
|
|
126 |
- No explanations or categories
|
127 |
- Add a line break between each name
|
128 |
- Avoid unnecessary : symbols
|
129 |
+
- Each webinar name must be a complete, intriguing and creative title
|
130 |
- WRITE ALL WEBINAR NAMES IN SPANISH
|
131 |
|
132 |
FORMAT EXAMPLE:
|
|
|
141 |
5. Nombre del Webinar 5.
|
142 |
|
143 |
IMPORTANT:
|
144 |
+
- Each webinar name must be unique, memorable and disruptive
|
145 |
+
- Create curiosity and intrigue with unexpected combinations
|
146 |
+
- Use creative language that stands out from typical webinar titles
|
147 |
+
- Incorporate pattern interrupts that make people stop scrolling
|
148 |
- Adapt speaking language from the audience
|
149 |
+
- Focus on transformative benefits with creative angles
|
150 |
+
- Follow the selected formula structure but add creative twists
|
151 |
- WRITE ALL WEBINAR NAMES IN SPANISH"""
|
152 |
|
153 |
# Iniciar el prompt con las instrucciones del sistema
|
|
|
173 |
|
174 |
# Instrucciones específicas para la tarea
|
175 |
webinar_names_instruction += (
|
176 |
+
f"\nYour task is to create {number_of_names} irresistible, creative and disruptive webinar names for {audience} "
|
177 |
f"that instantly capture attention and generate registrations for a webinar about {topic}. "
|
178 |
+
f"Focus on awakening genuine curiosity, creating intrigue, and communicating the value they will get by registering."
|
179 |
f"\n\n"
|
180 |
+
f"IMPORTANT: Use these examples of the selected formula as inspiration, but make your titles more creative and disruptive. "
|
181 |
+
f"Each example represents a base structure to follow, but add unexpected elements and creative twists"
|
182 |
f":\n\n"
|
183 |
)
|
184 |
|
185 |
# Agregar ejemplos aleatorios de la fórmula (keeping examples in Spanish)
|
186 |
random_examples = random.sample(selected_formula['examples'], min(5, len(selected_formula['examples'])))
|
187 |
+
webinar_names_instruction += "EXAMPLES OF THE FORMULA TO FOLLOW (BUT MAKE YOURS MORE CREATIVE):\n"
|
188 |
for i, example in enumerate(random_examples, 1):
|
189 |
webinar_names_instruction += f"{i}. {example}\n"
|
190 |
|
191 |
# Instrucciones específicas (translated to English)
|
192 |
webinar_names_instruction += "\nSPECIFIC INSTRUCTIONS:\n"
|
193 |
+
webinar_names_instruction += "1. Use the same basic structure as the examples but add creative twists\n"
|
194 |
+
webinar_names_instruction += "2. Create curiosity gaps that make people want to learn more\n"
|
195 |
+
webinar_names_instruction += "3. Use unexpected word combinations that surprise the reader\n"
|
196 |
+
webinar_names_instruction += "4. Incorporate pattern interrupts that make people stop and think\n"
|
197 |
+
webinar_names_instruction += f"5. Adapt the content for {audience} while making titles more memorable and disruptive\n\n"
|
198 |
+
webinar_names_instruction += f"FORMULA TO FOLLOW (AS A BASE):\n{selected_formula['description']}\n\n"
|
199 |
webinar_names_instruction += f"""
|
200 |
+
CREATIVE TECHNIQUES TO APPLY:
|
201 |
+
1. Use unexpected metaphors or analogies
|
202 |
+
2. Create intriguing contrasts or paradoxes
|
203 |
+
3. Challenge conventional wisdom with provocative statements
|
204 |
+
4. Use power words that evoke emotion
|
205 |
+
5. Create curiosity with incomplete loops or questions
|
206 |
+
6. Use specific numbers or data points that seem unusual
|
207 |
+
|
208 |
GENERATE NOW:
|
209 |
+
Create {number_of_names} creative, disruptive webinar names that use the formula structure as a base but add unexpected creative elements to make them stand out.
|
210 |
"""
|
211 |
|
212 |
# Enviar el mensaje al modelo
|