Spaces:
Running
Running
Upload 12 files
Browse files- app.py +505 -505
- formulas/webinar_name_formulas.py +159 -378
app.py
CHANGED
@@ -1,506 +1,506 @@
|
|
1 |
-
from dotenv import load_dotenv
|
2 |
-
import streamlit as st
|
3 |
-
import os
|
4 |
-
import google.generativeai as genai
|
5 |
-
import random
|
6 |
-
import datetime
|
7 |
-
from streamlit import session_state as state
|
8 |
-
from formulas.webinar_formulas import webinar_formulas
|
9 |
-
from formulas.webinar_name_formulas import webinar_name_formulas
|
10 |
-
from formulas.angles_webinar_names import angles_webinar_names
|
11 |
-
|
12 |
-
# Cargar las variables de entorno
|
13 |
-
load_dotenv()
|
14 |
-
|
15 |
-
# Configurar la API de Google
|
16 |
-
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
17 |
-
|
18 |
-
# Función auxiliar para mostrar el contenido generado y los botones de descarga
|
19 |
-
def display_generated_content(col, generated_content, content_type):
|
20 |
-
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
21 |
-
|
22 |
-
# Determinar el tipo de contenido para personalizar los botones y títulos
|
23 |
-
if content_type == "script":
|
24 |
-
download_label = "DESCARGAR GUIÓN DE WEBINAR ▶▶"
|
25 |
-
file_name = f"guion_webinar_{timestamp}.txt"
|
26 |
-
subheader_text = "Tu guión de webinar:"
|
27 |
-
|
28 |
-
# Mostrar botón de descarga superior para guiones
|
29 |
-
col.download_button(
|
30 |
-
label=download_label,
|
31 |
-
data=generated_content,
|
32 |
-
file_name=file_name,
|
33 |
-
mime="text/plain",
|
34 |
-
key=f"download_top_{content_type}"
|
35 |
-
)
|
36 |
-
else: # nombres
|
37 |
-
subheader_text = "Tus nombres de webinar:"
|
38 |
-
|
39 |
-
# Mostrar el contenido generado
|
40 |
-
col.subheader(subheader_text)
|
41 |
-
col.markdown(generated_content)
|
42 |
-
|
43 |
-
# Mostrar botón de descarga inferior solo para guiones
|
44 |
-
if content_type == "script":
|
45 |
-
col.download_button(
|
46 |
-
label=download_label,
|
47 |
-
data=generated_content,
|
48 |
-
file_name=file_name,
|
49 |
-
mime="text/plain",
|
50 |
-
key=f"download_bottom_{content_type}"
|
51 |
-
)
|
52 |
-
|
53 |
-
# Implementar la función generate_and_display para reemplazar código duplicado
|
54 |
-
def generate_and_display(col, generator_func, audience, product, temperature, selected_formula, content_type, **kwargs):
|
55 |
-
if validate_inputs(audience, product):
|
56 |
-
try:
|
57 |
-
with col:
|
58 |
-
with st.spinner(f"Generando {'guión' if content_type == 'script' else 'nombres'} de webinar...", show_time=True):
|
59 |
-
# Llamar a la función generadora con los parámetros adecuados
|
60 |
-
generated_content = generator_func(
|
61 |
-
audience=audience,
|
62 |
-
topic=product,
|
63 |
-
temperature=temperature,
|
64 |
-
selected_formula=selected_formula,
|
65 |
-
**kwargs
|
66 |
-
)
|
67 |
-
|
68 |
-
# Mostrar el contenido generado usando la función auxiliar
|
69 |
-
display_generated_content(col, generated_content, content_type)
|
70 |
-
|
71 |
-
except ValueError as e:
|
72 |
-
col.error(f"Error: {str(e)}")
|
73 |
-
else:
|
74 |
-
col.error("Por favor, proporciona el público objetivo y el tema del webinar.")
|
75 |
-
|
76 |
-
# Función para crear la configuración del modelo (evita duplicación)
|
77 |
-
def create_model_config(temperature):
|
78 |
-
return {
|
79 |
-
"temperature": temperature,
|
80 |
-
"top_p": 0.65,
|
81 |
-
"top_k": 360,
|
82 |
-
"max_output_tokens": 8196,
|
83 |
-
}
|
84 |
-
|
85 |
-
# Función para inicializar el modelo
|
86 |
-
def initialize_model(temperature):
|
87 |
-
config = create_model_config(temperature)
|
88 |
-
return genai.GenerativeModel(
|
89 |
-
model_name="gemini-2.0-flash",
|
90 |
-
generation_config=config,
|
91 |
-
)
|
92 |
-
|
93 |
-
# Refactored model interaction function to reduce duplication
|
94 |
-
def generate_content(prompt_instructions, temperature):
|
95 |
-
model = initialize_model(temperature)
|
96 |
-
chat_session = model.start_chat(
|
97 |
-
history=[
|
98 |
-
{
|
99 |
-
"role": "user",
|
100 |
-
"parts": [prompt_instructions],
|
101 |
-
},
|
102 |
-
]
|
103 |
-
)
|
104 |
-
response = chat_session.send_message("Generate the content following exactly the provided instructions. All content must be in Spanish.")
|
105 |
-
return response.text
|
106 |
-
|
107 |
-
# Función para generar nombres de webinars
|
108 |
-
# Refactorizar la función generate_webinar_names para que acepte los mismos parámetros que generate_webinar_script
|
109 |
-
def generate_webinar_names(audience, topic, temperature, selected_formula, number_of_names=5, selected_angle=None, **kwargs):
|
110 |
-
# Incluir las instrucciones del sistema en el prompt principal
|
111 |
-
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.
|
112 |
-
|
113 |
-
FORMAT RULES:
|
114 |
-
- Each webinar name must start with number and period
|
115 |
-
- One webinar name per line
|
116 |
-
- No explanations or categories
|
117 |
-
- Add a line break between each name
|
118 |
-
- Avoid unnecessary : symbols
|
119 |
-
- Each webinar name must be a complete, intriguing and creative title
|
120 |
-
- WRITE ALL WEBINAR NAMES IN SPANISH
|
121 |
-
|
122 |
-
FORMAT EXAMPLE:
|
123 |
-
1. Nombre del Webinar 1.
|
124 |
-
|
125 |
-
2. Nombre del Webinar 2.
|
126 |
-
|
127 |
-
3. Nombre del Webinar 3.
|
128 |
-
|
129 |
-
4. Nombre del Webinar 4.
|
130 |
-
|
131 |
-
5. Nombre del Webinar 5.
|
132 |
-
|
133 |
-
IMPORTANT:
|
134 |
-
- Each webinar name must be unique, memorable and disruptive
|
135 |
-
- Create curiosity and intrigue with unexpected combinations
|
136 |
-
- Use creative language that stands out from typical webinar titles
|
137 |
-
- Incorporate pattern interrupts that make people stop scrolling
|
138 |
-
- Adapt speaking language from the audience
|
139 |
-
- Focus on transformative benefits with creative angles
|
140 |
-
- Follow the selected formula structure but add creative twists
|
141 |
-
- WRITE ALL WEBINAR NAMES IN SPANISH"""
|
142 |
-
|
143 |
-
# Iniciar el prompt con las instrucciones del sistema
|
144 |
-
webinar_names_instruction = f"{system_prompt}\n\n"
|
145 |
-
|
146 |
-
# Añadir instrucciones de ángulo solo si no es "NINGUNO" y se proporcionó un ángulo
|
147 |
-
if selected_angle and selected_angle != "NINGUNO":
|
148 |
-
webinar_names_instruction += f"""
|
149 |
-
MAIN ANGLE: {selected_angle}
|
150 |
-
SPECIFIC ANGLE INSTRUCTIONS:
|
151 |
-
{angles_webinar_names[selected_angle]["instruction"]}
|
152 |
-
|
153 |
-
IMPORTANT: The {selected_angle} angle should be applied as a "style layer" over the formula structure:
|
154 |
-
1. Keep the base structure of the formula intact
|
155 |
-
2. Apply the tone and style of the {selected_angle} angle
|
156 |
-
3. Ensure that each element of the formula reflects the angle
|
157 |
-
4. The angle affects "how" it is said, not "what" is said
|
158 |
-
|
159 |
-
SUCCESSFUL EXAMPLES OF THE {selected_angle} ANGLE:
|
160 |
-
"""
|
161 |
-
for example in angles_webinar_names[selected_angle]["examples"]:
|
162 |
-
webinar_names_instruction += f"- {example}\n"
|
163 |
-
|
164 |
-
# Instrucciones específicas para la tarea
|
165 |
-
webinar_names_instruction += (
|
166 |
-
f"\nYour task is to create {number_of_names} irresistible, creative and disruptive webinar names for {audience} "
|
167 |
-
f"that instantly capture attention and generate registrations for a webinar about {topic}. "
|
168 |
-
f"Focus on awakening genuine curiosity, creating intrigue, and communicating the value they will get by registering."
|
169 |
-
f"\n\n"
|
170 |
-
f"IMPORTANT: Use these examples of the selected formula as inspiration, but make your titles more creative and disruptive. "
|
171 |
-
f"Each example represents a base structure to follow, but add unexpected elements and creative twists"
|
172 |
-
f":\n\n"
|
173 |
-
)
|
174 |
-
|
175 |
-
# Agregar ejemplos aleatorios de la fórmula (keeping examples in Spanish)
|
176 |
-
random_examples = random.sample(selected_formula['examples'], min(5, len(selected_formula['examples'])))
|
177 |
-
webinar_names_instruction += "EXAMPLES OF THE FORMULA TO FOLLOW (BUT MAKE YOURS MORE CREATIVE):\n"
|
178 |
-
for i, example in enumerate(random_examples, 1):
|
179 |
-
webinar_names_instruction += f"{i}. {example}\n"
|
180 |
-
|
181 |
-
# Instrucciones específicas (translated to English)
|
182 |
-
webinar_names_instruction += "\nSPECIFIC INSTRUCTIONS:\n"
|
183 |
-
webinar_names_instruction += "1. Use the same basic structure as the examples but add creative twists\n"
|
184 |
-
webinar_names_instruction += "2. Create curiosity gaps that make people want to learn more\n"
|
185 |
-
webinar_names_instruction += "3. Use unexpected word combinations that surprise the reader\n"
|
186 |
-
webinar_names_instruction += "4. Incorporate pattern interrupts that make people stop and think\n"
|
187 |
-
webinar_names_instruction += f"5. Adapt the content for {audience} while making titles more memorable and disruptive\n\n"
|
188 |
-
webinar_names_instruction += f"FORMULA TO FOLLOW (AS A BASE):\n{selected_formula['description']}\n\n"
|
189 |
-
webinar_names_instruction += f"""
|
190 |
-
CREATIVE TECHNIQUES TO APPLY:
|
191 |
-
1. Use unexpected metaphors or analogies
|
192 |
-
2. Create intriguing contrasts or paradoxes
|
193 |
-
3. Challenge conventional wisdom with provocative statements
|
194 |
-
4. Use power words that evoke emotion
|
195 |
-
5. Create curiosity with incomplete loops or questions
|
196 |
-
6. Use specific numbers or data points that seem unusual
|
197 |
-
|
198 |
-
GENERATE NOW:
|
199 |
-
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.
|
200 |
-
"""
|
201 |
-
|
202 |
-
# Enviar el mensaje al modelo
|
203 |
-
# Use the common generate_content function
|
204 |
-
return generate_content(webinar_names_instruction, temperature)
|
205 |
-
|
206 |
-
# Update the create_input_section function to include the product/offer field
|
207 |
-
def create_input_section(col, audience_key, product_key, formulas, formula_key, offer_key=None):
|
208 |
-
audience = col.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key=audience_key)
|
209 |
-
product = col.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key=product_key)
|
210 |
-
|
211 |
-
# Add the new product/offer field if a key is provided
|
212 |
-
offer = None
|
213 |
-
if offer_key:
|
214 |
-
offer = col.text_input("¿Cuál es tu producto u oferta?", placeholder="Ejemplo: Curso de marketing de afiliados", key=offer_key)
|
215 |
-
|
216 |
-
# Formula selection
|
217 |
-
formula_keys = list(formulas.keys())
|
218 |
-
selected_formula_key = col.selectbox(
|
219 |
-
"Selecciona un framework de webinar",
|
220 |
-
options=formula_keys,
|
221 |
-
key=formula_key
|
222 |
-
)
|
223 |
-
|
224 |
-
if offer_key:
|
225 |
-
return audience, product, selected_formula_key, offer
|
226 |
-
else:
|
227 |
-
return audience, product, selected_formula_key
|
228 |
-
|
229 |
-
# Update the generate_webinar_script function to include the offer parameter
|
230 |
-
def generate_webinar_script(audience, topic, temperature, selected_formula, offer=None, creative_idea=None):
|
231 |
-
model = initialize_model(temperature)
|
232 |
-
|
233 |
-
# Include offer in the system prompt if provided
|
234 |
-
offer_text = f" and selling {offer}" if offer else ""
|
235 |
-
|
236 |
-
# Incluir las instrucciones del sistema en el prompt principal
|
237 |
-
system_prompt = f"""You are a collaborative team of world-class experts working together to create an exceptional webinar script that converts audience into customers.
|
238 |
-
|
239 |
-
THE EXPERT TEAM:
|
240 |
-
|
241 |
-
1. MASTER WEBINAR STRATEGIST:
|
242 |
-
- Expert in webinar frameworks and conversion strategies
|
243 |
-
- Trained in the Perfect Webinar methodology by Russell Brunson
|
244 |
-
- Ensures the script follows the selected framework structure precisely
|
245 |
-
- Focuses on strategic placement of key conversion elements
|
246 |
-
|
247 |
-
2. ELITE DIRECT RESPONSE COPYWRITER:
|
248 |
-
- Trained by Gary Halbert, Gary Bencivenga, and David Ogilvy
|
249 |
-
- Creates compelling hooks, stories, and persuasive elements
|
250 |
-
- Crafts irresistible calls to action that drives conversions
|
251 |
-
- Ensures the language resonates with the target audience
|
252 |
-
|
253 |
-
3. AUDIENCE PSYCHOLOGY SPECIALIST:
|
254 |
-
- Expert in understanding audience motivations and objections
|
255 |
-
- Creates content that builds genuine connection and trust
|
256 |
-
- Identifies and addresses hidden fears and desires
|
257 |
-
- Ensures the content feels personal and relevant
|
258 |
-
|
259 |
-
4. STORYTELLING MASTER:
|
260 |
-
- Creates compelling narratives that illustrate key points
|
261 |
-
- Develops relatable examples and case studies
|
262 |
-
- Ensures stories support the transformation being offered
|
263 |
-
- Makes complex concepts accessible through narrative
|
264 |
-
|
265 |
-
5. WEBINAR ENGAGEMENT EXPERT:
|
266 |
-
- Specializes in maintaining audience attention throughout
|
267 |
-
- Creates interactive elements and engagement hooks
|
268 |
-
- Develops compelling transitions between sections
|
269 |
-
- Ensures the webinar flows naturally and keeps interest high
|
270 |
-
|
271 |
-
FORMAT REQUIREMENTS:
|
272 |
-
- Create a complete webinar script with clear sections and subsections
|
273 |
-
- Include specific talking points for each section
|
274 |
-
- Write in a conversational, engaging tone
|
275 |
-
- Include persuasive elements and calls to action
|
276 |
-
- Follow the selected webinar framework structure exactly
|
277 |
-
- WRITE THE ENTIRE SCRIPT IN SPANISH
|
278 |
-
- Start directly with the webinar content without introductory text
|
279 |
-
- DO NOT include any explanatory text at the beginning like "Here's the webinar script..." or "I've created a webinar script..."
|
280 |
-
|
281 |
-
COLLABORATIVE PROCESS:
|
282 |
-
As a team of experts, you will:
|
283 |
-
1. Analyze the framework '{selected_formula['description']}' to understand its core principles
|
284 |
-
2. Identify how to best adapt this framework for {audience} learning about {topic}{offer_text}
|
285 |
-
3. Create persuasive language that resonates with {audience}
|
286 |
-
4. Ensure the script maintains engagement throughout
|
287 |
-
5. Follow the exact structure provided in the framework"""
|
288 |
-
|
289 |
-
# Añadir instrucciones para la idea creativa si existe
|
290 |
-
if creative_idea:
|
291 |
-
system_prompt += f"""
|
292 |
-
CREATIVE CONCEPT:
|
293 |
-
Use the following creative concept as the central theme for the webinar:
|
294 |
-
"{creative_idea}"
|
295 |
-
|
296 |
-
CREATIVE CONCEPT INSTRUCTIONS:
|
297 |
-
1. This concept should be the unifying theme across the entire webinar
|
298 |
-
2. Use it as a metaphor or analogy throughout the presentation
|
299 |
-
3. Develop different aspects of this concept in each section
|
300 |
-
4. Make sure the concept naturally connects to the product benefits
|
301 |
-
5. The concept should make the webinar more memorable and engaging
|
302 |
-
"""
|
303 |
-
|
304 |
-
# Update the task instructions to include the offer
|
305 |
-
offer_instruction = f" and selling {offer}" if offer else ""
|
306 |
-
|
307 |
-
# Instrucciones específicas para la tarea
|
308 |
-
webinar_script_instruction = (
|
309 |
-
f"{system_prompt}\n\n"
|
310 |
-
f"\nYour task is to create a complete webinar script IN SPANISH for {audience} "
|
311 |
-
f"about {topic}{offer_instruction} that is persuasive and converts the audience into customers. "
|
312 |
-
f"The script must follow exactly the structure of the framework '{selected_formula['description']}' "
|
313 |
-
f"and must include all the necessary elements for a successful webinar."
|
314 |
-
f"\n\n"
|
315 |
-
)
|
316 |
-
|
317 |
-
# Estructura del webinar
|
318 |
-
webinar_script_instruction += "WEBINAR STRUCTURE TO FOLLOW:\n"
|
319 |
-
for i, step in enumerate(selected_formula['structure'], 1):
|
320 |
-
webinar_script_instruction += f"{i}. {step}\n"
|
321 |
-
|
322 |
-
# Ejemplos de webinars exitosos
|
323 |
-
webinar_script_instruction += "\n\nEXAMPLES OF SUCCESSFUL WEBINARS WITH THIS STRUCTURE:\n"
|
324 |
-
for i, example in enumerate(selected_formula['examples'], 1):
|
325 |
-
webinar_script_instruction += f"{i}. {example}\n"
|
326 |
-
|
327 |
-
# Instrucciones específicas - Reforzar el español
|
328 |
-
webinar_script_instruction += f"""
|
329 |
-
SPECIFIC INSTRUCTIONS:
|
330 |
-
1. Create a complete script that follows exactly the provided structure
|
331 |
-
2. Include persuasive elements and clear calls to action
|
332 |
-
3. Adapt the language and examples specifically for {audience}
|
333 |
-
4. Focus on the transformative benefits of {topic}
|
334 |
-
5. Include relevant stories and examples that reinforce your points
|
335 |
-
6. Use a conversational but professional tone
|
336 |
-
7. Make sure each section fulfills its specific purpose in the framework
|
337 |
-
8. IMPORTANT: Write the ENTIRE script in Spanish (neutral Latin American Spanish)
|
338 |
-
9. DO NOT include any introductory text like "Here's the webinar script..." or "I've created a webinar script..."
|
339 |
-
10. Start directly with the webinar title and content
|
340 |
-
11. ALL section titles, headers, and content MUST be in Spanish
|
341 |
-
12. Ensure ALL examples, stories, and calls to action are in Spanish
|
342 |
-
|
343 |
-
GENERATE NOW:
|
344 |
-
Create a complete webinar script following faithfully the structure of the selected framework, entirely in Spanish.
|
345 |
-
"""
|
346 |
-
|
347 |
-
# Enviar el mensaje al modelo
|
348 |
-
chat_session = model.start_chat(
|
349 |
-
history=[
|
350 |
-
{
|
351 |
-
"role": "user",
|
352 |
-
"parts": [webinar_script_instruction],
|
353 |
-
},
|
354 |
-
]
|
355 |
-
)
|
356 |
-
response = chat_session.send_message("Generate the webinar script IN NEUTRAL SPANISH following exactly the provided structure. All content must be in neutral Spanish (not Spain Spanish). Start directly with the webinar content without any introductory text.")
|
357 |
-
|
358 |
-
return response.text
|
359 |
-
|
360 |
-
# Función para validar entradas (evita duplicación)
|
361 |
-
def validate_inputs(audience, product):
|
362 |
-
has_audience = audience.strip() != ""
|
363 |
-
has_product = product.strip() != ""
|
364 |
-
return has_audience and has_product
|
365 |
-
|
366 |
-
# Update the load_css function comment to be more descriptive
|
367 |
-
def load_css():
|
368 |
-
css_path = "styles/styles.css"
|
369 |
-
if os.path.exists(css_path):
|
370 |
-
try:
|
371 |
-
with open(css_path, "r") as f:
|
372 |
-
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
|
373 |
-
except Exception as e:
|
374 |
-
st.warning(f"Error al cargar el archivo CSS: {str(e)}")
|
375 |
-
else:
|
376 |
-
st.warning(f"No se encontró el archivo CSS en {css_path}")
|
377 |
-
|
378 |
-
# Modify the page config section to include the CSS loading and remove menu
|
379 |
-
st.set_page_config(
|
380 |
-
page_title="Perfect Webinar Framework",
|
381 |
-
layout="wide",
|
382 |
-
initial_sidebar_state="expanded",
|
383 |
-
menu_items=None # This removes the three dots menu
|
384 |
-
)
|
385 |
-
load_css() # This will load the styles from styles.css
|
386 |
-
|
387 |
-
# Leer el contenido del archivo manual.md
|
388 |
-
with open("manual.md", "r", encoding="utf-8") as file:
|
389 |
-
manual_content = file.read()
|
390 |
-
|
391 |
-
# Mostrar el contenido del manual en el sidebar
|
392 |
-
st.sidebar.markdown(manual_content)
|
393 |
-
|
394 |
-
# Agregar título y subtítulo usando HTML
|
395 |
-
st.markdown("<h1 style='text-align: center;'>Perfect Webinar Framework</h1>", unsafe_allow_html=True)
|
396 |
-
st.markdown("<h3 style='text-align: center;'>Crea guiones y títulos de webinars persuasivos que convierten</h3>", unsafe_allow_html=True)
|
397 |
-
|
398 |
-
# Crear pestañas para la interfaz
|
399 |
-
tab1, tab2 = st.tabs(["Guiones de Webinar", "Nombres de Webinar"])
|
400 |
-
|
401 |
-
# Primera pestaña - Generador de Guiones de Webinar
|
402 |
-
with tab1:
|
403 |
-
tab1.subheader("Script Webinar")
|
404 |
-
|
405 |
-
# Crear columnas para la interfaz
|
406 |
-
col1, col2 = tab1.columns([1, 2])
|
407 |
-
|
408 |
-
# Columna de entrada usando la función reutilizable
|
409 |
-
with col1:
|
410 |
-
# Inputs básicos (fuera del acordeón)
|
411 |
-
webinar_script_audience = st.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key="webinar_script_audience")
|
412 |
-
webinar_script_product = st.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key="webinar_script_product")
|
413 |
-
webinar_script_offer = st.text_input("¿Cuál es tu producto u oferta?", placeholder="Ejemplo: Curso de marketing de afiliados", key="webinar_script_offer")
|
414 |
-
|
415 |
-
# Botón de generación (movido aquí, justo después de los campos principales)
|
416 |
-
submit_webinar_script = st.button("GENERAR GUIÓN DE WEBINAR ▶▶", key="generate_webinar_script")
|
417 |
-
|
418 |
-
# Opciones avanzadas en el acordeón
|
419 |
-
with st.expander("Personaliza tu guión de webinar"):
|
420 |
-
# Selector de fórmula (ahora dentro del acordeón)
|
421 |
-
selected_webinar_formula_key = st.selectbox(
|
422 |
-
"Selecciona un framework de webinar",
|
423 |
-
options=list(webinar_formulas.keys()),
|
424 |
-
key="webinar_formula"
|
425 |
-
)
|
426 |
-
|
427 |
-
# Nuevo campo para la idea creativa
|
428 |
-
creative_idea = st.text_area(
|
429 |
-
"Idea creativa (opcional)",
|
430 |
-
placeholder="Introduce una idea o concepto creativo que quieras usar como tema central en tu webinar",
|
431 |
-
help="Este concepto será el tema unificador a lo largo de tu webinar, haciéndolo más memorable y atractivo",
|
432 |
-
key="webinar_creative_idea"
|
433 |
-
)
|
434 |
-
|
435 |
-
# Slider de creatividad (ya existente)
|
436 |
-
webinar_script_temperature = st.slider("Creatividad", min_value=0.0, max_value=2.0, value=1.0, step=0.1, key="webinar_script_temp")
|
437 |
-
|
438 |
-
selected_webinar_formula = webinar_formulas[selected_webinar_formula_key]
|
439 |
-
|
440 |
-
# Usar la función generate_and_display para generar y mostrar el guión
|
441 |
-
if submit_webinar_script:
|
442 |
-
generate_and_display(
|
443 |
-
col=col2,
|
444 |
-
generator_func=generate_webinar_script,
|
445 |
-
audience=webinar_script_audience,
|
446 |
-
product=webinar_script_product,
|
447 |
-
temperature=webinar_script_temperature,
|
448 |
-
selected_formula=selected_webinar_formula,
|
449 |
-
content_type="script",
|
450 |
-
offer=webinar_script_offer if webinar_script_offer.strip() else None,
|
451 |
-
creative_idea=creative_idea if creative_idea.strip() else None
|
452 |
-
)
|
453 |
-
|
454 |
-
# Segunda pestaña - Generador de Nombres de Webinar
|
455 |
-
with tab2:
|
456 |
-
tab2.subheader("Nombres de Webinar")
|
457 |
-
|
458 |
-
# Crear columnas para la interfaz
|
459 |
-
col1, col2 = tab2.columns([1, 2])
|
460 |
-
|
461 |
-
# Columna de entrada
|
462 |
-
with col1:
|
463 |
-
# Inputs básicos
|
464 |
-
webinar_names_audience = st.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key="webinar_names_audience")
|
465 |
-
webinar_names_product = st.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key="webinar_names_product")
|
466 |
-
|
467 |
-
# Botón de generación (movido aquí, justo después de los campos principales)
|
468 |
-
submit_webinar_names = st.button("GENERAR NOMBRES DE WEBINAR ▶▶", key="generate_webinar_names")
|
469 |
-
|
470 |
-
# Opciones avanzadas en el acordeón
|
471 |
-
with st.expander("Personaliza tus nombres de webinar"):
|
472 |
-
# Selector de fórmula
|
473 |
-
selected_name_formula_key = st.selectbox(
|
474 |
-
"Selecciona una fórmula para tus nombres",
|
475 |
-
options=list(webinar_name_formulas.keys()),
|
476 |
-
key="webinar_name_formula"
|
477 |
-
)
|
478 |
-
|
479 |
-
# Selector de ángulo
|
480 |
-
selected_angle = st.selectbox(
|
481 |
-
"Selecciona un ángulo (opcional)",
|
482 |
-
options=["NINGUNO"] + list(angles_webinar_names.keys()),
|
483 |
-
key="webinar_name_angle"
|
484 |
-
)
|
485 |
-
|
486 |
-
# Número de nombres a generar
|
487 |
-
number_of_names = st.slider("Número de nombres a generar", min_value=3, max_value=15, value=5, step=1, key="number_of_names")
|
488 |
-
|
489 |
-
# Slider de creatividad
|
490 |
-
webinar_names_temperature = st.slider("Creatividad", min_value=0.0, max_value=2.0, value=1.0, step=0.1, key="webinar_names_temp")
|
491 |
-
|
492 |
-
selected_name_formula = webinar_name_formulas[selected_name_formula_key]
|
493 |
-
|
494 |
-
# Usar la función generate_and_display para generar y mostrar los nombres
|
495 |
-
if submit_webinar_names:
|
496 |
-
generate_and_display(
|
497 |
-
col=col2,
|
498 |
-
generator_func=generate_webinar_names,
|
499 |
-
audience=webinar_names_audience,
|
500 |
-
product=webinar_names_product,
|
501 |
-
temperature=webinar_names_temperature,
|
502 |
-
selected_formula=selected_name_formula,
|
503 |
-
content_type="names",
|
504 |
-
number_of_names=number_of_names,
|
505 |
-
selected_angle=selected_angle if selected_angle != "NINGUNO" else None
|
506 |
)
|
|
|
1 |
+
from dotenv import load_dotenv
|
2 |
+
import streamlit as st
|
3 |
+
import os
|
4 |
+
import google.generativeai as genai
|
5 |
+
import random
|
6 |
+
import datetime
|
7 |
+
from streamlit import session_state as state
|
8 |
+
from formulas.webinar_formulas import webinar_formulas
|
9 |
+
from formulas.webinar_name_formulas import webinar_name_formulas
|
10 |
+
from formulas.angles_webinar_names import angles_webinar_names
|
11 |
+
|
12 |
+
# Cargar las variables de entorno
|
13 |
+
load_dotenv()
|
14 |
+
|
15 |
+
# Configurar la API de Google
|
16 |
+
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
|
17 |
+
|
18 |
+
# Función auxiliar para mostrar el contenido generado y los botones de descarga
|
19 |
+
def display_generated_content(col, generated_content, content_type):
|
20 |
+
timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
|
21 |
+
|
22 |
+
# Determinar el tipo de contenido para personalizar los botones y títulos
|
23 |
+
if content_type == "script":
|
24 |
+
download_label = "DESCARGAR GUIÓN DE WEBINAR ▶▶"
|
25 |
+
file_name = f"guion_webinar_{timestamp}.txt"
|
26 |
+
subheader_text = "Tu guión de webinar:"
|
27 |
+
|
28 |
+
# Mostrar botón de descarga superior para guiones
|
29 |
+
col.download_button(
|
30 |
+
label=download_label,
|
31 |
+
data=generated_content,
|
32 |
+
file_name=file_name,
|
33 |
+
mime="text/plain",
|
34 |
+
key=f"download_top_{content_type}"
|
35 |
+
)
|
36 |
+
else: # nombres
|
37 |
+
subheader_text = "Tus nombres de webinar:"
|
38 |
+
|
39 |
+
# Mostrar el contenido generado
|
40 |
+
col.subheader(subheader_text)
|
41 |
+
col.markdown(generated_content)
|
42 |
+
|
43 |
+
# Mostrar botón de descarga inferior solo para guiones
|
44 |
+
if content_type == "script":
|
45 |
+
col.download_button(
|
46 |
+
label=download_label,
|
47 |
+
data=generated_content,
|
48 |
+
file_name=file_name,
|
49 |
+
mime="text/plain",
|
50 |
+
key=f"download_bottom_{content_type}"
|
51 |
+
)
|
52 |
+
|
53 |
+
# Implementar la función generate_and_display para reemplazar código duplicado
|
54 |
+
def generate_and_display(col, generator_func, audience, product, temperature, selected_formula, content_type, **kwargs):
|
55 |
+
if validate_inputs(audience, product):
|
56 |
+
try:
|
57 |
+
with col:
|
58 |
+
with st.spinner(f"Generando {'guión' if content_type == 'script' else 'nombres'} de webinar...", show_time=True):
|
59 |
+
# Llamar a la función generadora con los parámetros adecuados
|
60 |
+
generated_content = generator_func(
|
61 |
+
audience=audience,
|
62 |
+
topic=product,
|
63 |
+
temperature=temperature,
|
64 |
+
selected_formula=selected_formula,
|
65 |
+
**kwargs
|
66 |
+
)
|
67 |
+
|
68 |
+
# Mostrar el contenido generado usando la función auxiliar
|
69 |
+
display_generated_content(col, generated_content, content_type)
|
70 |
+
|
71 |
+
except ValueError as e:
|
72 |
+
col.error(f"Error: {str(e)}")
|
73 |
+
else:
|
74 |
+
col.error("Por favor, proporciona el público objetivo y el tema del webinar.")
|
75 |
+
|
76 |
+
# Función para crear la configuración del modelo (evita duplicación)
|
77 |
+
def create_model_config(temperature):
|
78 |
+
return {
|
79 |
+
"temperature": temperature,
|
80 |
+
"top_p": 0.65,
|
81 |
+
"top_k": 360,
|
82 |
+
"max_output_tokens": 8196,
|
83 |
+
}
|
84 |
+
|
85 |
+
# Función para inicializar el modelo
|
86 |
+
def initialize_model(temperature):
|
87 |
+
config = create_model_config(temperature)
|
88 |
+
return genai.GenerativeModel(
|
89 |
+
model_name="gemini-2.0-flash",
|
90 |
+
generation_config=config,
|
91 |
+
)
|
92 |
+
|
93 |
+
# Refactored model interaction function to reduce duplication
|
94 |
+
def generate_content(prompt_instructions, temperature):
|
95 |
+
model = initialize_model(temperature)
|
96 |
+
chat_session = model.start_chat(
|
97 |
+
history=[
|
98 |
+
{
|
99 |
+
"role": "user",
|
100 |
+
"parts": [prompt_instructions],
|
101 |
+
},
|
102 |
+
]
|
103 |
+
)
|
104 |
+
response = chat_session.send_message("Generate the content following exactly the provided instructions. All content must be in Spanish.")
|
105 |
+
return response.text
|
106 |
+
|
107 |
+
# Función para generar nombres de webinars
|
108 |
+
# Refactorizar la función generate_webinar_names para que acepte los mismos parámetros que generate_webinar_script
|
109 |
+
def generate_webinar_names(audience, topic, temperature, selected_formula, number_of_names=5, selected_angle=None, **kwargs):
|
110 |
+
# Incluir las instrucciones del sistema en el prompt principal
|
111 |
+
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.
|
112 |
+
|
113 |
+
FORMAT RULES:
|
114 |
+
- Each webinar name must start with number and period
|
115 |
+
- One webinar name per line
|
116 |
+
- No explanations or categories
|
117 |
+
- Add a line break between each name
|
118 |
+
- Avoid unnecessary : symbols
|
119 |
+
- Each webinar name must be a complete, intriguing and creative title
|
120 |
+
- WRITE ALL WEBINAR NAMES IN SPANISH
|
121 |
+
|
122 |
+
FORMAT EXAMPLE:
|
123 |
+
1. Nombre del Webinar 1.
|
124 |
+
|
125 |
+
2. Nombre del Webinar 2.
|
126 |
+
|
127 |
+
3. Nombre del Webinar 3.
|
128 |
+
|
129 |
+
4. Nombre del Webinar 4.
|
130 |
+
|
131 |
+
5. Nombre del Webinar 5.
|
132 |
+
|
133 |
+
IMPORTANT:
|
134 |
+
- Each webinar name must be unique, memorable and disruptive
|
135 |
+
- Create curiosity and intrigue with unexpected combinations
|
136 |
+
- Use creative language that stands out from typical webinar titles
|
137 |
+
- Incorporate pattern interrupts that make people stop scrolling
|
138 |
+
- Adapt speaking language from the audience
|
139 |
+
- Focus on transformative benefits with creative angles
|
140 |
+
- Follow the selected formula structure but add creative twists
|
141 |
+
- WRITE ALL WEBINAR NAMES IN SPANISH"""
|
142 |
+
|
143 |
+
# Iniciar el prompt con las instrucciones del sistema
|
144 |
+
webinar_names_instruction = f"{system_prompt}\n\n"
|
145 |
+
|
146 |
+
# Añadir instrucciones de ángulo solo si no es "NINGUNO" y se proporcionó un ángulo
|
147 |
+
if selected_angle and selected_angle != "NINGUNO":
|
148 |
+
webinar_names_instruction += f"""
|
149 |
+
MAIN ANGLE: {selected_angle}
|
150 |
+
SPECIFIC ANGLE INSTRUCTIONS:
|
151 |
+
{angles_webinar_names[selected_angle]["instruction"]}
|
152 |
+
|
153 |
+
IMPORTANT: The {selected_angle} angle should be applied as a "style layer" over the formula structure:
|
154 |
+
1. Keep the base structure of the formula intact
|
155 |
+
2. Apply the tone and style of the {selected_angle} angle
|
156 |
+
3. Ensure that each element of the formula reflects the angle
|
157 |
+
4. The angle affects "how" it is said, not "what" is said
|
158 |
+
|
159 |
+
SUCCESSFUL EXAMPLES OF THE {selected_angle} ANGLE:
|
160 |
+
"""
|
161 |
+
for example in angles_webinar_names[selected_angle]["examples"]:
|
162 |
+
webinar_names_instruction += f"- {example}\n"
|
163 |
+
|
164 |
+
# Instrucciones específicas para la tarea
|
165 |
+
webinar_names_instruction += (
|
166 |
+
f"\nYour task is to create {number_of_names} irresistible, creative and disruptive webinar names for {audience} "
|
167 |
+
f"that instantly capture attention and generate registrations for a webinar about {topic}. "
|
168 |
+
f"Focus on awakening genuine curiosity, creating intrigue, and communicating the value they will get by registering."
|
169 |
+
f"\n\n"
|
170 |
+
f"IMPORTANT: Use these examples of the selected formula as inspiration, but make your titles more creative and disruptive. "
|
171 |
+
f"Each example represents a base structure to follow, but add unexpected elements and creative twists"
|
172 |
+
f":\n\n"
|
173 |
+
)
|
174 |
+
|
175 |
+
# Agregar ejemplos aleatorios de la fórmula (keeping examples in Spanish)
|
176 |
+
random_examples = random.sample(selected_formula['examples'], min(5, len(selected_formula['examples'])))
|
177 |
+
webinar_names_instruction += "EXAMPLES OF THE FORMULA TO FOLLOW (BUT MAKE YOURS MORE CREATIVE):\n"
|
178 |
+
for i, example in enumerate(random_examples, 1):
|
179 |
+
webinar_names_instruction += f"{i}. {example}\n"
|
180 |
+
|
181 |
+
# Instrucciones específicas (translated to English)
|
182 |
+
webinar_names_instruction += "\nSPECIFIC INSTRUCTIONS:\n"
|
183 |
+
webinar_names_instruction += "1. Use the same basic structure as the examples but add creative twists\n"
|
184 |
+
webinar_names_instruction += "2. Create curiosity gaps that make people want to learn more\n"
|
185 |
+
webinar_names_instruction += "3. Use unexpected word combinations that surprise the reader\n"
|
186 |
+
webinar_names_instruction += "4. Incorporate pattern interrupts that make people stop and think\n"
|
187 |
+
webinar_names_instruction += f"5. Adapt the content for {audience} while making titles more memorable and disruptive\n\n"
|
188 |
+
webinar_names_instruction += f"FORMULA TO FOLLOW (AS A BASE):\n{selected_formula['description']}\n\n"
|
189 |
+
webinar_names_instruction += f"""
|
190 |
+
CREATIVE TECHNIQUES TO APPLY:
|
191 |
+
1. Use unexpected metaphors or analogies
|
192 |
+
2. Create intriguing contrasts or paradoxes
|
193 |
+
3. Challenge conventional wisdom with provocative statements
|
194 |
+
4. Use power words that evoke emotion
|
195 |
+
5. Create curiosity with incomplete loops or questions
|
196 |
+
6. Use specific numbers or data points that seem unusual
|
197 |
+
|
198 |
+
GENERATE NOW:
|
199 |
+
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.
|
200 |
+
"""
|
201 |
+
|
202 |
+
# Enviar el mensaje al modelo
|
203 |
+
# Use the common generate_content function
|
204 |
+
return generate_content(webinar_names_instruction, temperature)
|
205 |
+
|
206 |
+
# Update the create_input_section function to include the product/offer field
|
207 |
+
def create_input_section(col, audience_key, product_key, formulas, formula_key, offer_key=None):
|
208 |
+
audience = col.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key=audience_key)
|
209 |
+
product = col.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key=product_key)
|
210 |
+
|
211 |
+
# Add the new product/offer field if a key is provided
|
212 |
+
offer = None
|
213 |
+
if offer_key:
|
214 |
+
offer = col.text_input("¿Cuál es tu producto u oferta?", placeholder="Ejemplo: Curso de marketing de afiliados", key=offer_key)
|
215 |
+
|
216 |
+
# Formula selection
|
217 |
+
formula_keys = list(formulas.keys())
|
218 |
+
selected_formula_key = col.selectbox(
|
219 |
+
"Selecciona un framework de webinar",
|
220 |
+
options=formula_keys,
|
221 |
+
key=formula_key
|
222 |
+
)
|
223 |
+
|
224 |
+
if offer_key:
|
225 |
+
return audience, product, selected_formula_key, offer
|
226 |
+
else:
|
227 |
+
return audience, product, selected_formula_key
|
228 |
+
|
229 |
+
# Update the generate_webinar_script function to include the offer parameter
|
230 |
+
def generate_webinar_script(audience, topic, temperature, selected_formula, offer=None, creative_idea=None):
|
231 |
+
model = initialize_model(temperature)
|
232 |
+
|
233 |
+
# Include offer in the system prompt if provided
|
234 |
+
offer_text = f" and selling {offer}" if offer else ""
|
235 |
+
|
236 |
+
# Incluir las instrucciones del sistema en el prompt principal
|
237 |
+
system_prompt = f"""You are a collaborative team of world-class experts working together to create an exceptional webinar script that converts audience into customers.
|
238 |
+
|
239 |
+
THE EXPERT TEAM:
|
240 |
+
|
241 |
+
1. MASTER WEBINAR STRATEGIST:
|
242 |
+
- Expert in webinar frameworks and conversion strategies
|
243 |
+
- Trained in the Perfect Webinar methodology by Russell Brunson
|
244 |
+
- Ensures the script follows the selected framework structure precisely
|
245 |
+
- Focuses on strategic placement of key conversion elements
|
246 |
+
|
247 |
+
2. ELITE DIRECT RESPONSE COPYWRITER:
|
248 |
+
- Trained by Gary Halbert, Gary Bencivenga, and David Ogilvy
|
249 |
+
- Creates compelling hooks, stories, and persuasive elements
|
250 |
+
- Crafts irresistible calls to action that drives conversions
|
251 |
+
- Ensures the language resonates with the target audience
|
252 |
+
|
253 |
+
3. AUDIENCE PSYCHOLOGY SPECIALIST:
|
254 |
+
- Expert in understanding audience motivations and objections
|
255 |
+
- Creates content that builds genuine connection and trust
|
256 |
+
- Identifies and addresses hidden fears and desires
|
257 |
+
- Ensures the content feels personal and relevant
|
258 |
+
|
259 |
+
4. STORYTELLING MASTER:
|
260 |
+
- Creates compelling narratives that illustrate key points
|
261 |
+
- Develops relatable examples and case studies
|
262 |
+
- Ensures stories support the transformation being offered
|
263 |
+
- Makes complex concepts accessible through narrative
|
264 |
+
|
265 |
+
5. WEBINAR ENGAGEMENT EXPERT:
|
266 |
+
- Specializes in maintaining audience attention throughout
|
267 |
+
- Creates interactive elements and engagement hooks
|
268 |
+
- Develops compelling transitions between sections
|
269 |
+
- Ensures the webinar flows naturally and keeps interest high
|
270 |
+
|
271 |
+
FORMAT REQUIREMENTS:
|
272 |
+
- Create a complete webinar script with clear sections and subsections
|
273 |
+
- Include specific talking points for each section
|
274 |
+
- Write in a conversational, engaging tone
|
275 |
+
- Include persuasive elements and calls to action
|
276 |
+
- Follow the selected webinar framework structure exactly
|
277 |
+
- WRITE THE ENTIRE SCRIPT IN SPANISH
|
278 |
+
- Start directly with the webinar content without introductory text
|
279 |
+
- DO NOT include any explanatory text at the beginning like "Here's the webinar script..." or "I've created a webinar script..."
|
280 |
+
|
281 |
+
COLLABORATIVE PROCESS:
|
282 |
+
As a team of experts, you will:
|
283 |
+
1. Analyze the framework '{selected_formula['description']}' to understand its core principles
|
284 |
+
2. Identify how to best adapt this framework for {audience} learning about {topic}{offer_text}
|
285 |
+
3. Create persuasive language that resonates with {audience}
|
286 |
+
4. Ensure the script maintains engagement throughout
|
287 |
+
5. Follow the exact structure provided in the framework"""
|
288 |
+
|
289 |
+
# Añadir instrucciones para la idea creativa si existe
|
290 |
+
if creative_idea:
|
291 |
+
system_prompt += f"""
|
292 |
+
CREATIVE CONCEPT:
|
293 |
+
Use the following creative concept as the central theme for the webinar:
|
294 |
+
"{creative_idea}"
|
295 |
+
|
296 |
+
CREATIVE CONCEPT INSTRUCTIONS:
|
297 |
+
1. This concept should be the unifying theme across the entire webinar
|
298 |
+
2. Use it as a metaphor or analogy throughout the presentation
|
299 |
+
3. Develop different aspects of this concept in each section
|
300 |
+
4. Make sure the concept naturally connects to the product benefits
|
301 |
+
5. The concept should make the webinar more memorable and engaging
|
302 |
+
"""
|
303 |
+
|
304 |
+
# Update the task instructions to include the offer
|
305 |
+
offer_instruction = f" and selling {offer}" if offer else ""
|
306 |
+
|
307 |
+
# Instrucciones específicas para la tarea
|
308 |
+
webinar_script_instruction = (
|
309 |
+
f"{system_prompt}\n\n"
|
310 |
+
f"\nYour task is to create a complete webinar script IN SPANISH for {audience} "
|
311 |
+
f"about {topic}{offer_instruction} that is persuasive and converts the audience into customers. "
|
312 |
+
f"The script must follow exactly the structure of the framework '{selected_formula['description']}' "
|
313 |
+
f"and must include all the necessary elements for a successful webinar."
|
314 |
+
f"\n\n"
|
315 |
+
)
|
316 |
+
|
317 |
+
# Estructura del webinar
|
318 |
+
webinar_script_instruction += "WEBINAR STRUCTURE TO FOLLOW:\n"
|
319 |
+
for i, step in enumerate(selected_formula['structure'], 1):
|
320 |
+
webinar_script_instruction += f"{i}. {step}\n"
|
321 |
+
|
322 |
+
# Ejemplos de webinars exitosos
|
323 |
+
webinar_script_instruction += "\n\nEXAMPLES OF SUCCESSFUL WEBINARS WITH THIS STRUCTURE:\n"
|
324 |
+
for i, example in enumerate(selected_formula['examples'], 1):
|
325 |
+
webinar_script_instruction += f"{i}. {example}\n"
|
326 |
+
|
327 |
+
# Instrucciones específicas - Reforzar el español
|
328 |
+
webinar_script_instruction += f"""
|
329 |
+
SPECIFIC INSTRUCTIONS:
|
330 |
+
1. Create a complete script that follows exactly the provided structure
|
331 |
+
2. Include persuasive elements and clear calls to action
|
332 |
+
3. Adapt the language and examples specifically for {audience}
|
333 |
+
4. Focus on the transformative benefits of {topic}
|
334 |
+
5. Include relevant stories and examples that reinforce your points
|
335 |
+
6. Use a conversational but professional tone
|
336 |
+
7. Make sure each section fulfills its specific purpose in the framework
|
337 |
+
8. IMPORTANT: Write the ENTIRE script in Spanish (neutral Latin American Spanish)
|
338 |
+
9. DO NOT include any introductory text like "Here's the webinar script..." or "I've created a webinar script..."
|
339 |
+
10. Start directly with the webinar title and content
|
340 |
+
11. ALL section titles, headers, and content MUST be in Spanish
|
341 |
+
12. Ensure ALL examples, stories, and calls to action are in Spanish
|
342 |
+
|
343 |
+
GENERATE NOW:
|
344 |
+
Create a complete webinar script following faithfully the structure of the selected framework, entirely in Spanish.
|
345 |
+
"""
|
346 |
+
|
347 |
+
# Enviar el mensaje al modelo
|
348 |
+
chat_session = model.start_chat(
|
349 |
+
history=[
|
350 |
+
{
|
351 |
+
"role": "user",
|
352 |
+
"parts": [webinar_script_instruction],
|
353 |
+
},
|
354 |
+
]
|
355 |
+
)
|
356 |
+
response = chat_session.send_message("Generate the webinar script IN NEUTRAL SPANISH following exactly the provided structure. All content must be in neutral Spanish (not Spain Spanish). Start directly with the webinar content without any introductory text.")
|
357 |
+
|
358 |
+
return response.text
|
359 |
+
|
360 |
+
# Función para validar entradas (evita duplicación)
|
361 |
+
def validate_inputs(audience, product):
|
362 |
+
has_audience = audience.strip() != ""
|
363 |
+
has_product = product.strip() != ""
|
364 |
+
return has_audience and has_product
|
365 |
+
|
366 |
+
# Update the load_css function comment to be more descriptive
|
367 |
+
def load_css():
|
368 |
+
css_path = "styles/styles.css"
|
369 |
+
if os.path.exists(css_path):
|
370 |
+
try:
|
371 |
+
with open(css_path, "r") as f:
|
372 |
+
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
|
373 |
+
except Exception as e:
|
374 |
+
st.warning(f"Error al cargar el archivo CSS: {str(e)}")
|
375 |
+
else:
|
376 |
+
st.warning(f"No se encontró el archivo CSS en {css_path}")
|
377 |
+
|
378 |
+
# Modify the page config section to include the CSS loading and remove menu
|
379 |
+
st.set_page_config(
|
380 |
+
page_title="Perfect Webinar Framework",
|
381 |
+
layout="wide",
|
382 |
+
initial_sidebar_state="expanded",
|
383 |
+
menu_items=None # This removes the three dots menu
|
384 |
+
)
|
385 |
+
load_css() # This will load the styles from styles.css
|
386 |
+
|
387 |
+
# Leer el contenido del archivo manual.md
|
388 |
+
with open("manual.md", "r", encoding="utf-8") as file:
|
389 |
+
manual_content = file.read()
|
390 |
+
|
391 |
+
# Mostrar el contenido del manual en el sidebar
|
392 |
+
st.sidebar.markdown(manual_content)
|
393 |
+
|
394 |
+
# Agregar título y subtítulo usando HTML
|
395 |
+
st.markdown("<h1 style='text-align: center;'>Perfect Webinar Framework</h1>", unsafe_allow_html=True)
|
396 |
+
st.markdown("<h3 style='text-align: center;'>Crea guiones y títulos de webinars persuasivos que convierten</h3>", unsafe_allow_html=True)
|
397 |
+
|
398 |
+
# Crear pestañas para la interfaz
|
399 |
+
tab1, tab2 = st.tabs(["Guiones de Webinar", "Nombres de Webinar"])
|
400 |
+
|
401 |
+
# Primera pestaña - Generador de Guiones de Webinar
|
402 |
+
with tab1:
|
403 |
+
tab1.subheader("Script Webinar")
|
404 |
+
|
405 |
+
# Crear columnas para la interfaz
|
406 |
+
col1, col2 = tab1.columns([1, 2])
|
407 |
+
|
408 |
+
# Columna de entrada usando la función reutilizable
|
409 |
+
with col1:
|
410 |
+
# Inputs básicos (fuera del acordeón)
|
411 |
+
webinar_script_audience = st.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key="webinar_script_audience")
|
412 |
+
webinar_script_product = st.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key="webinar_script_product")
|
413 |
+
webinar_script_offer = st.text_input("¿Cuál es tu producto u oferta?", placeholder="Ejemplo: Curso de marketing de afiliados", key="webinar_script_offer")
|
414 |
+
|
415 |
+
# Botón de generación (movido aquí, justo después de los campos principales)
|
416 |
+
submit_webinar_script = st.button("GENERAR GUIÓN DE WEBINAR ▶▶", key="generate_webinar_script")
|
417 |
+
|
418 |
+
# Opciones avanzadas en el acordeón
|
419 |
+
with st.expander("Personaliza tu guión de webinar"):
|
420 |
+
# Selector de fórmula (ahora dentro del acordeón)
|
421 |
+
selected_webinar_formula_key = st.selectbox(
|
422 |
+
"Selecciona un framework de webinar",
|
423 |
+
options=list(webinar_formulas.keys()),
|
424 |
+
key="webinar_formula"
|
425 |
+
)
|
426 |
+
|
427 |
+
# Nuevo campo para la idea creativa
|
428 |
+
creative_idea = st.text_area(
|
429 |
+
"Idea creativa (opcional)",
|
430 |
+
placeholder="Introduce una idea o concepto creativo que quieras usar como tema central en tu webinar",
|
431 |
+
help="Este concepto será el tema unificador a lo largo de tu webinar, haciéndolo más memorable y atractivo",
|
432 |
+
key="webinar_creative_idea"
|
433 |
+
)
|
434 |
+
|
435 |
+
# Slider de creatividad (ya existente)
|
436 |
+
webinar_script_temperature = st.slider("Creatividad", min_value=0.0, max_value=2.0, value=1.0, step=0.1, key="webinar_script_temp")
|
437 |
+
|
438 |
+
selected_webinar_formula = webinar_formulas[selected_webinar_formula_key]
|
439 |
+
|
440 |
+
# Usar la función generate_and_display para generar y mostrar el guión
|
441 |
+
if submit_webinar_script:
|
442 |
+
generate_and_display(
|
443 |
+
col=col2,
|
444 |
+
generator_func=generate_webinar_script,
|
445 |
+
audience=webinar_script_audience,
|
446 |
+
product=webinar_script_product,
|
447 |
+
temperature=webinar_script_temperature,
|
448 |
+
selected_formula=selected_webinar_formula,
|
449 |
+
content_type="script",
|
450 |
+
offer=webinar_script_offer if webinar_script_offer.strip() else None,
|
451 |
+
creative_idea=creative_idea if creative_idea.strip() else None
|
452 |
+
)
|
453 |
+
|
454 |
+
# Segunda pestaña - Generador de Nombres de Webinar
|
455 |
+
with tab2:
|
456 |
+
tab2.subheader("Nombres de Webinar")
|
457 |
+
|
458 |
+
# Crear columnas para la interfaz
|
459 |
+
col1, col2 = tab2.columns([1, 2])
|
460 |
+
|
461 |
+
# Columna de entrada
|
462 |
+
with col1:
|
463 |
+
# Inputs básicos
|
464 |
+
webinar_names_audience = st.text_input("¿Quién es tu público objetivo?", placeholder="Ejemplo: Emprendedores digitales", key="webinar_names_audience")
|
465 |
+
webinar_names_product = st.text_input("¿Sobre qué tema es tu webinar?", placeholder="Ejemplo: Marketing de afiliados", key="webinar_names_product")
|
466 |
+
|
467 |
+
# Botón de generación (movido aquí, justo después de los campos principales)
|
468 |
+
submit_webinar_names = st.button("GENERAR NOMBRES DE WEBINAR ▶▶", key="generate_webinar_names")
|
469 |
+
|
470 |
+
# Opciones avanzadas en el acordeón
|
471 |
+
with st.expander("Personaliza tus nombres de webinar"):
|
472 |
+
# Selector de fórmula
|
473 |
+
selected_name_formula_key = st.selectbox(
|
474 |
+
"Selecciona una fórmula para tus nombres",
|
475 |
+
options=list(webinar_name_formulas.keys()),
|
476 |
+
key="webinar_name_formula"
|
477 |
+
)
|
478 |
+
|
479 |
+
# Selector de ángulo
|
480 |
+
selected_angle = st.selectbox(
|
481 |
+
"Selecciona un ángulo (opcional)",
|
482 |
+
options=["NINGUNO"] + list(angles_webinar_names.keys()),
|
483 |
+
key="webinar_name_angle"
|
484 |
+
)
|
485 |
+
|
486 |
+
# Número de nombres a generar
|
487 |
+
number_of_names = st.slider("Número de nombres a generar", min_value=3, max_value=15, value=5, step=1, key="number_of_names")
|
488 |
+
|
489 |
+
# Slider de creatividad
|
490 |
+
webinar_names_temperature = st.slider("Creatividad", min_value=0.0, max_value=2.0, value=1.0, step=0.1, key="webinar_names_temp")
|
491 |
+
|
492 |
+
selected_name_formula = webinar_name_formulas[selected_name_formula_key]
|
493 |
+
|
494 |
+
# Usar la función generate_and_display para generar y mostrar los nombres
|
495 |
+
if submit_webinar_names:
|
496 |
+
generate_and_display(
|
497 |
+
col=col2,
|
498 |
+
generator_func=generate_webinar_names,
|
499 |
+
audience=webinar_names_audience,
|
500 |
+
product=webinar_names_product,
|
501 |
+
temperature=webinar_names_temperature,
|
502 |
+
selected_formula=selected_name_formula,
|
503 |
+
content_type="names",
|
504 |
+
number_of_names=number_of_names,
|
505 |
+
selected_angle=selected_angle if selected_angle != "NINGUNO" else None
|
506 |
)
|
formulas/webinar_name_formulas.py
CHANGED
@@ -2,401 +2,182 @@
|
|
2 |
webinar_name_formulas = {
|
3 |
"GPS": {
|
4 |
"description": """
|
5 |
-
|
6 |
-
|
7 |
-
1. **
|
8 |
-
|
9 |
-
-
|
10 |
-
-
|
11 |
-
-
|
12 |
-
-
|
13 |
-
|
14 |
-
2. **
|
15 |
-
|
16 |
-
-
|
17 |
-
-
|
18 |
-
-
|
19 |
-
-
|
20 |
-
|
21 |
-
3. **
|
22 |
-
|
23 |
-
-
|
24 |
-
-
|
25 |
-
-
|
26 |
-
-
|
27 |
-
-
|
28 |
-
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
El titular debe ser comprensible y ocasionalmente divertido.
|
33 |
""",
|
34 |
"examples": [
|
35 |
-
|
36 |
-
"
|
37 |
-
|
38 |
-
|
39 |
-
"
|
40 |
-
|
41 |
-
|
42 |
-
"
|
43 |
-
|
44 |
-
|
45 |
-
"Desarrolla músculos preparando café cuando levantar la taza te parece ejercicio extremo",
|
46 |
-
|
47 |
-
# Situación Relatable
|
48 |
-
"Domina la fotografía profesional en el supermercado aun con ese celular que sobrevivió tres caídas",
|
49 |
-
|
50 |
-
# Humor Cotidiano
|
51 |
-
"Cultiva un huerto mientras contestas emails aunque tu única planta sobreviviente sea de plástico",
|
52 |
-
|
53 |
-
# Autorreferencial
|
54 |
-
"Escribe tu bestseller mientras te duchas por más que tu gato sea tu único fan",
|
55 |
-
|
56 |
-
# Situación Común
|
57 |
-
"Aprende meditación lavando platos ni siquiera necesitas ponerte en pose pretzel",
|
58 |
-
|
59 |
-
# Exageración
|
60 |
-
"Domina el trading paseando al perro incluso si las matemáticas te dan alergia",
|
61 |
-
|
62 |
-
# Contraste Divertido
|
63 |
-
"Transforma tu postura en videollamadas aunque tu silla parezca instrumento de tortura medieval",
|
64 |
-
|
65 |
-
# Situación Familiar
|
66 |
-
"Aprende a tocar la guitarra cocinando aunque tus vecinos amenacen con mudarse",
|
67 |
-
|
68 |
-
# Humor Autoderrisivo
|
69 |
-
"Mejora tu inglés cantando en la ducha a pesar de que suenes como gato en febrero",
|
70 |
-
|
71 |
-
# Realidad Común
|
72 |
-
"Desarrolla tu marca personal haciendo la colada cuando Instagram te parece ciencia espacial",
|
73 |
-
|
74 |
-
# Situación Real
|
75 |
-
"Domina el networking comprando el pan aun con tu talento para olvidar nombres",
|
76 |
-
|
77 |
-
# Humor + Verdad
|
78 |
-
"Construye tu portfolio mientras ves series aunque tu sofá tenga poderes hipnóticos",
|
79 |
-
|
80 |
-
# Exageración Graciosa
|
81 |
-
"Aprende programación jugando con tus hijos por más que tu computadora sea del jurásico",
|
82 |
-
|
83 |
-
# Situación Cotidiana
|
84 |
-
"Domina la cocina saludable ordenando tu escritorio incluso si hervir agua es tu especialidad",
|
85 |
-
|
86 |
-
# Realidad + Humor
|
87 |
-
"Conquista Instagram esperando el metro hasta con fotos de tu almuerzo congelado",
|
88 |
-
|
89 |
-
# Contraste Gracioso
|
90 |
-
"Transforma tu rutina de ejercicios contestando emails incluso si tu idea de deporte es buscar el control remoto",
|
91 |
-
|
92 |
-
# Humor + Aspiración
|
93 |
-
"Desarrolla músculos de acero haciendo las compras aunque las bolsas del super sean tu único peso"
|
94 |
]
|
95 |
},
|
96 |
"Númerica Suprema": {
|
97 |
"description": """
|
98 |
-
|
99 |
-
|
100 |
-
1. **
|
101 |
-
-
|
102 |
-
-
|
103 |
-
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
-
|
108 |
-
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
-
|
113 |
-
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
-
|
118 |
-
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
-
|
123 |
-
-
|
124 |
-
|
125 |
-
|
126 |
-
6. **Promesa** (P):
|
127 |
-
- Resultado específico y medible
|
128 |
-
- Timeframe realista
|
129 |
-
- Beneficio final atractivo
|
130 |
-
|
131 |
-
Formatos:
|
132 |
-
- Corto: Art plural + N + A + P + P
|
133 |
-
- Medio: Art plural + N + A + P + R + P
|
134 |
-
- Largo: Art plural + N + A + P + R detallada + P específica
|
135 |
""",
|
136 |
"examples": [
|
137 |
-
"
|
138 |
-
"Las
|
139 |
-
"Los
|
140 |
-
"
|
141 |
-
"Los
|
142 |
-
"
|
143 |
-
"
|
144 |
-
"Las
|
145 |
-
"Los
|
146 |
-
|
147 |
-
"variaciones_estructura": {
|
148 |
-
"básica": "Art plural + N + A + P + P",
|
149 |
-
"intermedia": "Art plural + N + A + P + R + P",
|
150 |
-
"avanzada": "Art plural + N + A + P + R detallada + P específica"
|
151 |
-
},
|
152 |
-
"uso_articulos_plurales": {
|
153 |
-
"masculino_plural": {
|
154 |
-
"artículo": "los",
|
155 |
-
"ejemplos_palabras": "métodos, sistemas, pasos, secretos, trucos, hábitos"
|
156 |
-
},
|
157 |
-
"femenino_plural": {
|
158 |
-
"artículo": "las",
|
159 |
-
"ejemplos_palabras": "técnicas, estrategias, rutinas, tácticas, claves"
|
160 |
-
}
|
161 |
-
},
|
162 |
-
"consejos_uso": [
|
163 |
-
"Usa siempre la forma plural para mayor impacto",
|
164 |
-
"Alterna entre 'los' y 'las' según la palabra clave",
|
165 |
-
"Mantén coherencia en el género a lo largo del bullet",
|
166 |
-
"Combina artículos con números de forma natural",
|
167 |
-
"Asegura que la palabra clave esté en plural"
|
168 |
]
|
169 |
},
|
170 |
"AIDA": {
|
171 |
"description": """
|
172 |
-
|
173 |
-
|
174 |
-
1. **
|
175 |
-
|
176 |
-
-
|
177 |
-
-
|
178 |
-
-
|
179 |
-
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
-
|
191 |
-
-
|
192 |
-
-
|
193 |
-
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
-
|
199 |
-
-
|
200 |
-
-
|
201 |
-
|
202 |
-
|
203 |
-
- "Imagina poder..."
|
204 |
-
- "Piensa cómo sería..."
|
205 |
-
- "Esto significa que podrás..."
|
206 |
-
|
207 |
-
4. **Acción** (A):
|
208 |
-
Cierre natural:
|
209 |
-
- Siguiente paso simple
|
210 |
-
- Baja fricción para comenzar
|
211 |
-
- Gratificación inmediata
|
212 |
-
- Primer paso sencillo
|
213 |
-
- Seguridad fluida
|
214 |
-
- "Pruébalo hoy mismo..."
|
215 |
-
- "Comienza con un simple..."
|
216 |
-
- "Solo necesitas..."
|
217 |
-
|
218 |
-
Combinaciones estratégicas:
|
219 |
-
- A + I: Para despertar curiosidad y explicar el valor
|
220 |
-
- A + D: Para conectar problema con deseo
|
221 |
-
- I + D: Para construir deseo desde la lógica
|
222 |
-
- I + D + A: Para construir convicción y motivar
|
223 |
-
- A + I + D: Para educar, intrigar y crear anhelo
|
224 |
-
|
225 |
-
Cada titular debe mantener un tono conversacional y evitar parecer una fórmula obvia.
|
226 |
""",
|
227 |
"examples": [
|
228 |
-
|
229 |
-
"
|
230 |
-
|
231 |
-
|
232 |
-
"
|
233 |
-
|
234 |
-
|
235 |
-
"
|
236 |
-
|
237 |
-
|
238 |
-
"Me sorprendió descubrir que los mejores vendedores nunca memorizan scripts, usan una técnica secreta de improvisación.",
|
239 |
-
|
240 |
-
# I (método único) + D (transformación) + A (acción)
|
241 |
-
"Esta técnica revolucionaria de aprendizaje está transformando cómo los profesionales dominan nuevas habilidades, pruébala hoy con solo 10 minutos.",
|
242 |
-
|
243 |
-
# I (innovación) + D (beneficio) + A (inicio)
|
244 |
-
"El método del empresario silencioso cambia las reglas del networking moderno, empieza con un simple ejercicio.",
|
245 |
-
|
246 |
-
# A (pregunta gancho) + D (resultado) + A (implementación)
|
247 |
-
"¿Sabías que existe un ritual zen que está transformando la productividad en Silicon Valley? Implementalo mañana mismo.",
|
248 |
-
|
249 |
-
# A (analogía) + D (promesa) + A (descubrimiento)
|
250 |
-
"Como el bambú japonés, este método crece silenciosamente hasta que explota en resultados, descubre cómo en 5 minutos.",
|
251 |
-
|
252 |
-
# A (mayoría) + I (validación) + A (acción)
|
253 |
-
"La mayoría desconoce el mejor momento para tomar decisiones importantes, la ciencia lo confirma, implementa este descubrimiento hoy.",
|
254 |
-
|
255 |
-
# A (mini-cambio) + I (resultado) + A (inicio)
|
256 |
-
"Un pequeño cambio en tu rutina de email desencadenará mejoras exponenciales, comienza ahora.",
|
257 |
-
|
258 |
-
# A + I + D + A (metáfora natural)
|
259 |
-
"Como el bambú japonés, este método crece invisible hasta explotar en resultados que transformarán tu negocio",
|
260 |
-
|
261 |
-
# A + I + D + A (analogía deportiva)
|
262 |
-
"Los atletas olímpicos entrenan menos horas pero logran más que sus rivales gracias a esta técnica de productividad japonesa",
|
263 |
-
|
264 |
-
# A + I + D (metáfora de naturaleza)
|
265 |
-
"Al igual que las abejas construyen colmenas perfectas, este sistema organiza tu tiempo en patrones de máxima eficiencia",
|
266 |
-
|
267 |
-
# A + I + D (analogía artística)
|
268 |
-
"Como un director de orquesta que guía sin palabras, este método de ventas fluye naturalmente en cada conversación",
|
269 |
-
|
270 |
-
# I + D + A (metáfora de agua)
|
271 |
-
"Este sistema de aprendizaje fluye como un río, adaptándose naturalmente a tu estilo mientras potencia tus habilidades",
|
272 |
-
|
273 |
-
# I + D + A (analogía arquitectónica)
|
274 |
-
"Como los antiguos arquitectos japoneses que construían sin clavos, este método de networking conecta sin forzar relaciones",
|
275 |
-
|
276 |
-
# A + D + A (metáfora zen)
|
277 |
-
"Similar al jardín zen que revela su belleza gradualmente, esta rutina matutina despliega tu potencial día tras día",
|
278 |
-
|
279 |
-
# A + D + A (analogía natural)
|
280 |
-
"Como el roble que crece firme ante las tormentas, este método fortalece tu productividad en tiempos de caos",
|
281 |
-
|
282 |
-
# A + I + A (metáfora lunar)
|
283 |
-
"Al igual que la luna influye en las mareas, la neurociencia revela los ciclos naturales de tu productividad máxima",
|
284 |
-
|
285 |
-
# A + I + A (analogía culinaria)
|
286 |
-
"Como un chef que transforma ingredientes simples en obras maestras, este sistema eleva tu rutina diaria a resultados extraordinarios"
|
287 |
]
|
288 |
},
|
289 |
"4U": {
|
290 |
"description": """
|
291 |
-
|
292 |
-
|
293 |
-
1.
|
294 |
-
|
295 |
-
-
|
296 |
-
-
|
297 |
-
-
|
298 |
-
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
-
|
310 |
-
-
|
311 |
-
-
|
312 |
-
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
-
|
318 |
-
-
|
319 |
-
-
|
320 |
-
|
321 |
-
|
322 |
-
- "El enfoque innovador..."
|
323 |
-
- "La solución inesperada..."
|
324 |
-
- "El método exclusivo..."
|
325 |
-
|
326 |
-
4. **Ultra-específico** (Ultra-specific):
|
327 |
-
Detalles precisos y medibles:
|
328 |
-
- Números exactos: "27 técnicas..."
|
329 |
-
- Tiempos concretos: "13 minutos..."
|
330 |
-
- Resultados medibles: "63% más..."
|
331 |
-
- Pasos definidos: "3 pasos..."
|
332 |
-
- Datos precisos: "8.3 veces más..."
|
333 |
-
- Métricas claras: "2.5x más rápido..."
|
334 |
-
- Cantidades específicas: "97 personas..."
|
335 |
-
- Plazos definidos: "21 días..."
|
336 |
-
|
337 |
-
Combinaciones estratégicas:
|
338 |
-
- Útil + Ultra-específico: Para audiencias prácticas y orientadas a resultados
|
339 |
-
- Urgente + Único: Para ofertas especiales y lanzamientos
|
340 |
-
- Único + Ultra-específico: Para diferenciación basada en datos
|
341 |
-
- Útil + Urgente: Para motivar acción inmediata
|
342 |
-
- Útil + Único + Ultra-específico: Para establecer autoridad y credibilidad
|
343 |
-
- Útil + Urgente + Ultra-específico: Para ofertas con beneficios medibles
|
344 |
-
- Único + Urgente + Ultra-específico: Para lanzamientos exclusivos
|
345 |
-
- Útil + Único + Urgente: Para ofertas transformadoras
|
346 |
-
- Las 4U juntas: Para máximo impacto en ofertas premium
|
347 |
-
|
348 |
-
Cada titular debe mantener un tono conversacional y evitar parecer una fórmula obvia.
|
349 |
""",
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
"La técnica de un bibliotecario jubilado cataloga 47893 libros en 73 días usando fichas de colores",
|
364 |
-
"Un taxista noruego fotografía 12437 auroras boreales usando un iPhone 6 y tres filtros caseros",
|
365 |
-
|
366 |
-
# Útil + Urgente (Para motivar acción inmediata)
|
367 |
-
"Aprende a crear tu huerto urbano antes de que suban los precios de las verduras",
|
368 |
-
"Asegura tu plaza en el programa de ahorro energético antes del aumento de tarifas",
|
369 |
-
"Registra tu marca personal mientras el dominio premium sigue disponible",
|
370 |
-
|
371 |
-
# Útil + Único + Ultra-específico (Para establecer autoridad y credibilidad)
|
372 |
-
"La técnica de un cartero rural ayuda a 1893 personas a organizar su tiempo usando solo 17 minutos cada mañana",
|
373 |
-
"Un bibliotecario retirado genera 12437 euros vendiendo libros antiguos por menos de 3 euros cada uno",
|
374 |
-
"Una abuela italiana entrena algoritmos que reducen el tiempo de cocción un 82% manteniendo el sabor tradicional",
|
375 |
-
|
376 |
-
# Útil + Urgente + Ultra-específico (Para ofertas con beneficios medibles)
|
377 |
-
"Aprende 478 palabras en japonés en 21 días antes del aumento de precio del programa",
|
378 |
-
"Automatiza 95% de tu contabilidad en 7 días previo a la nueva normativa fiscal",
|
379 |
-
"Genera 7 fuentes de ingresos pasivos en 30 días antes del cambio en las regulaciones",
|
380 |
-
|
381 |
-
# Único + Urgente + Ultra-específico (Para lanzamientos exclusivos)
|
382 |
-
"El sistema de un monje copista digitaliza 7345 manuscritos en 31 días últimas plazas disponibles",
|
383 |
-
"La fórmula de un taxista fotografía 893 auroras boreales perfectas registro exclusivo esta semana",
|
384 |
-
"El método de un bibliotecario jubilado organiza 47893 archivos en 73 días acceso limitado",
|
385 |
-
|
386 |
-
# Útil + Único + Urgente (Para ofertas transformadoras)
|
387 |
-
"La técnica de un cartero rural transforma tu productividad antes del fin de semana",
|
388 |
-
"El sistema de una abuela italiana revoluciona tu forma de cocinar registro beta por 24 horas",
|
389 |
-
"El método de un bibliotecario maximiza tu capacidad de aprendizaje plazas limitadas"
|
390 |
-
],
|
391 |
-
"consejos_uso": [
|
392 |
-
"Asegura que cada elemento U refuerce a los demás",
|
393 |
-
"Mantén un equilibrio entre urgencia y credibilidad",
|
394 |
-
"Usa datos específicos para aumentar la confianza",
|
395 |
-
"Adapta el orden de los elementos según tu audiencia",
|
396 |
-
"Evita exageraciones que puedan generar desconfianza",
|
397 |
-
"Combina los elementos de forma natural y fluida",
|
398 |
-
"Asegúrate de que cada elemento añada valor real",
|
399 |
-
"Prueba diferentes combinaciones para encontrar las más efectivas"
|
400 |
-
]
|
401 |
-
}
|
402 |
}
|
|
|
2 |
webinar_name_formulas = {
|
3 |
"GPS": {
|
4 |
"description": """
|
5 |
+
The GPS Formula (Goal-Period-Solution) creates persuasive webinar names by mixing creativity and value:
|
6 |
+
|
7 |
+
1. **Goal**:
|
8 |
+
What result will the attendee achieve?
|
9 |
+
- Desired transformation
|
10 |
+
- Acquired skill
|
11 |
+
- Problem solved
|
12 |
+
- Opportunity seized
|
13 |
+
|
14 |
+
2. **Period**:
|
15 |
+
In what context or timeframe?
|
16 |
+
- Specific situation
|
17 |
+
- Moment of change
|
18 |
+
- Relevant context
|
19 |
+
- Particular circumstance
|
20 |
+
|
21 |
+
3. **Solution Connector**:
|
22 |
+
Creative connectors that generate intrigue:
|
23 |
+
- without (barrier elimination)
|
24 |
+
- even if (challenge overcome)
|
25 |
+
- although (surprising contrast)
|
26 |
+
- despite (victory over adversity)
|
27 |
+
- when (timely opportunity)
|
28 |
+
- even with (limitations overcome)
|
29 |
+
|
30 |
+
The name must be memorable, intriguing and generate immediate curiosity.
|
|
|
|
|
31 |
""",
|
32 |
"examples": [
|
33 |
+
"Domina el Marketing Digital en 30 Días Sin Conocimientos Técnicos",
|
34 |
+
"Conquista Instagram Aunque Nunca Hayas Publicado una Foto",
|
35 |
+
"Lanza tu Podcast Exitoso Incluso Si Odias tu Propia Voz",
|
36 |
+
"Monetiza tu Pasión A Pesar de Empezar desde Cero",
|
37 |
+
"Construye tu Audiencia Cuando Nadie Te Conoce Todavía",
|
38 |
+
"Crea tu Curso Online Aun Con un Presupuesto Mínimo",
|
39 |
+
"Posiciónate como Experto Sin Necesitar Títulos Académicos",
|
40 |
+
"Vende tus Servicios Premium Aunque el Mercado Esté Saturado",
|
41 |
+
"Automatiza tu Negocio Mientras Disfrutas de Más Tiempo Libre",
|
42 |
+
"Escala tu Emprendimiento Sin Sacrificar tu Vida Personal"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
]
|
44 |
},
|
45 |
"Númerica Suprema": {
|
46 |
"description": """
|
47 |
+
The Supreme Numeric Formula combines key elements to create irresistible webinar names:
|
48 |
+
|
49 |
+
1. **Impactful Numbers**:
|
50 |
+
- Specific and memorable (3, 5, 7, 10...)
|
51 |
+
- Create structure and clear expectations
|
52 |
+
- Generate immediate curiosity
|
53 |
+
|
54 |
+
2. **Powerful Adjectives**:
|
55 |
+
- Emotional and descriptive
|
56 |
+
- Connect with desires/fears
|
57 |
+
- Examples: revolutionary, infallible, secret, forbidden
|
58 |
+
|
59 |
+
3. **Transformative Keywords**:
|
60 |
+
- Terms that promise change
|
61 |
+
- Easy to understand and remember
|
62 |
+
- Examples: methods, strategies, techniques, systems
|
63 |
+
|
64 |
+
4. **Specific Promise**:
|
65 |
+
- Concrete and desirable result
|
66 |
+
- Clear and attractive benefit
|
67 |
+
- Guaranteed transformation
|
68 |
+
|
69 |
+
5. **Disruptive Element**:
|
70 |
+
- Unexpected twist
|
71 |
+
- Surprising contrast
|
72 |
+
- Counterintuitive concept
|
73 |
+
|
74 |
+
The name must generate immediate curiosity and desire to register.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
""",
|
76 |
"examples": [
|
77 |
+
"Las 7 Estrategias Prohibidas para Triplicar tus Ventas en 90 Días",
|
78 |
+
"Las 3 Técnicas Secretas de Copywriting que las Grandes Marcas No Quieren que Conozcas",
|
79 |
+
"Los 5 Sistemas Revolucionarios para Automatizar tu Negocio Mientras Duermes",
|
80 |
+
"Los 10 Métodos Infalibles para Crear Contenido Viral sin Ser Influencer",
|
81 |
+
"Los 4 Pilares Invisibles del Éxito que los Gurús Nunca Revelan",
|
82 |
+
"Los 6 Atajos Mentales para Dominar Cualquier Habilidad en Tiempo Récord",
|
83 |
+
"Las 8 Fórmulas Secretas para Convertir Seguidores en Clientes Fieles",
|
84 |
+
"Las 12 Tácticas Contraintuitivas que Transformarán tu Marca Personal",
|
85 |
+
"Los 9 Rituales Matutinos que Garantizan el Éxito (El #6 Cambiará tu Vida)",
|
86 |
+
"Los 7 Errores Fatales que Están Saboteando tu Crecimiento (y Cómo Evitarlos)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
]
|
88 |
},
|
89 |
"AIDA": {
|
90 |
"description": """
|
91 |
+
The AIDA formula adapted for webinar names combines elements to capture immediate attention:
|
92 |
+
|
93 |
+
1. **Attention**:
|
94 |
+
Irresistible opening hooks:
|
95 |
+
- Surprising revelation
|
96 |
+
- Bold promise
|
97 |
+
- Counterintuitive concept
|
98 |
+
- Exclusive discovery
|
99 |
+
|
100 |
+
2. **Interest**:
|
101 |
+
Elements that deepen curiosity:
|
102 |
+
- Specific benefit
|
103 |
+
- Little-known method
|
104 |
+
- Exclusive system
|
105 |
+
- Innovative approach
|
106 |
+
|
107 |
+
3. **Desire**:
|
108 |
+
Emotional amplifiers:
|
109 |
+
- Desired transformation
|
110 |
+
- Specific result
|
111 |
+
- Competitive advantage
|
112 |
+
- Definitive solution
|
113 |
+
|
114 |
+
4. **Action**:
|
115 |
+
Elements of urgency or exclusivity:
|
116 |
+
- Limited opportunity
|
117 |
+
- Privileged access
|
118 |
+
- Decisive moment
|
119 |
+
- Transformation window
|
120 |
+
|
121 |
+
The name must create an irresistible promise that generates immediate registrations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
""",
|
123 |
"examples": [
|
124 |
+
"¿Y Si Los Leads Se Generaran Solos? El Extraño Método que Funciona Sin Publicidad",
|
125 |
+
"La Paradoja del Embudo Invertido Convierte al 27% Cuando Haces Exactamente lo Contrario",
|
126 |
+
"Confesiones de un Email Abandonado Las Estrategias que Tu Bandeja de Entrada No Quiere que Sepas",
|
127 |
+
"El Experimento Prohibido Cómo la Industria del Coaching Cambió Para Siempre en 2023",
|
128 |
+
"Con Arquitectura Digital Construye tu Imperio Online en 90 Días o Te Devolvemos Tu Tiempo",
|
129 |
+
"Las 3 Palancas Invisibles Para Crecer en Redes Mientras Todos Hacen lo Mismo",
|
130 |
+
"Por Qué la Rebelión del Contenido Está Saboteando lo que Funcionaba Ayer",
|
131 |
+
"Con Productos Digitales que se Venden Solos Descubre la Ciencia Detrás del Éxito Mientras Duermes",
|
132 |
+
"Hackea la Mente de tus Clientes y Sé su Primera Opción con el Código del Posicionamiento",
|
133 |
+
"La Fórmula de los 6 Ceros Rompe Todos los Récords en Solo 7 Días"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
]
|
135 |
},
|
136 |
"4U": {
|
137 |
"description": """
|
138 |
+
The 4U formula adapted for webinar names combines elements for maximum impact:
|
139 |
+
|
140 |
+
1. **Useful**:
|
141 |
+
Concrete value promises:
|
142 |
+
- Definitive solution
|
143 |
+
- Proven system
|
144 |
+
- Effective method
|
145 |
+
- Complete framework
|
146 |
+
|
147 |
+
2. **Urgent**:
|
148 |
+
Time or exclusivity elements:
|
149 |
+
- Limited opportunity
|
150 |
+
- Early access
|
151 |
+
- Unique event
|
152 |
+
- Action window
|
153 |
+
|
154 |
+
3. **Unique**:
|
155 |
+
Memorable differentiators:
|
156 |
+
- Revolutionary approach
|
157 |
+
- Counterintuitive method
|
158 |
+
- Exclusive system
|
159 |
+
- Patented technique
|
160 |
+
|
161 |
+
4. **Ultra-specific**:
|
162 |
+
Precise and measurable details:
|
163 |
+
- Quantifiable results
|
164 |
+
- Concrete timeframes
|
165 |
+
- Specific benefits
|
166 |
+
- Measurable transformation
|
167 |
+
|
168 |
+
The name must combine these elements to create an irresistible proposition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
""",
|
170 |
+
"examples": [
|
171 |
+
"Con Los 3 Pilares Invisibles Genera 10K Mensuales Sin Experiencia Previa ni Contactos",
|
172 |
+
"La Paradoja del Tráfico Frío Convierte Desconocidos en Clientes en Solo 72 Horas",
|
173 |
+
"Multiplica tu Audiencia por 10 en 60 Días con la Estrategia de Contenidos que Nadie Está Usando",
|
174 |
+
"Construye tu Ecosistema de 6 Cifras Sin Burnout con Arquitectura de Membresías",
|
175 |
+
"Domina Instagram Sin Sacrificar 3 Horas Diarias de tu Vida con el Algoritmo Descifrado",
|
176 |
+
"Con el Framework de los 5 Pasos Vende tus Servicios al Precio que Merecen Sin Objeciones",
|
177 |
+
"Con Ingeniería de Funnels Crea tu Sistema de Ventas Automatizado en 14 Días o Menos",
|
178 |
+
"Por Qué Algunos Cobran el Doble con la Mitad de Esfuerzo Gracias a la Ciencia del Posicionamiento Premium",
|
179 |
+
"Genera 100K Sin Lista, Sin Contactos y Sin Experiencia Previa con el Lanzamiento Fantasma",
|
180 |
+
"De Freelancer Estresado a Empresario Digital en 90 Días con las 4 Fases de la Agencia Rentable"
|
181 |
+
]
|
182 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
}
|