JeCabrera commited on
Commit
475f3d0
·
verified ·
1 Parent(s): e3163bf

Upload 23 files

Browse files
Files changed (4) hide show
  1. app.py +407 -417
  2. prompts/closing.txt +90 -0
  3. prompts/faq.txt +102 -0
  4. prompts/guarantees.txt +118 -118
app.py CHANGED
@@ -1,418 +1,408 @@
1
- from dotenv import load_dotenv
2
- import streamlit as st
3
- import os
4
- import google.generativeai as genai
5
- import datetime
6
- from streamlit import session_state as state
7
-
8
- # Cargar las variables de entorno
9
- load_dotenv()
10
-
11
- # Configurar la API de Google
12
- genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
13
-
14
- # Función para inicializar el modelo
15
- def initialize_model(temperature=1.0):
16
- return genai.GenerativeModel(
17
- model_name="gemini-2.0-flash",
18
- generation_config={"temperature": temperature}
19
- )
20
-
21
- # Initialize session state variables at the app level
22
- session_state_vars = {
23
- 'headline_content': "",
24
- 'problem_content': "",
25
- 'solution_content': "",
26
- 'avatar_details': {},
27
- 'product_details': {},
28
- 'generated_sections': {},
29
- 'metadata': {},
30
- 'avatar_analysis': {} # Add this new session state variable
31
- }
32
-
33
- for var, default in session_state_vars.items():
34
- if var not in st.session_state:
35
- st.session_state[var] = default
36
-
37
- # Función para generar contenido y procesar el JSON
38
- def generate_content(prompt, temperature=1.0):
39
- model = initialize_model(temperature)
40
-
41
- response = model.generate_content(prompt)
42
- result = response.text
43
-
44
- # Try to extract JSON metadata if present and remove it from the displayed text
45
- try:
46
- import json
47
- import re
48
-
49
- # Look for JSON data in the response (both with and without code blocks)
50
- json_pattern = r'```json\s*(.*?)\s*```|(\{[\s\S]*"character"[\s\S]*\})'
51
- json_match = re.search(json_pattern, result, re.DOTALL)
52
-
53
- if json_match:
54
- # Get the matched JSON string (either from code block or raw JSON)
55
- json_str = json_match.group(1) if json_match.group(1) else json_match.group(2)
56
-
57
- # Parse the JSON data
58
- json_data = json.loads(json_str.strip())
59
-
60
- # Store the JSON data in session state
61
- st.session_state.metadata = json_data
62
-
63
- # Update avatar details and other metadata elements
64
- metadata_fields = ['character', 'pain_points', 'emotional_triggers', 'obstacles', 'failed_solutions']
65
- for field in metadata_fields:
66
- if field in json_data:
67
- if field == 'character' and 'avatar_details' in st.session_state:
68
- st.session_state.avatar_details.update(json_data[field])
69
- else:
70
- st.session_state[field] = json_data[field]
71
-
72
- # Remove the JSON block from the displayed text
73
- result = re.sub(json_pattern, '', result, flags=re.DOTALL).strip()
74
- except Exception as e:
75
- # Log the error but don't disrupt the user experience
76
- print(f"Error processing JSON metadata: {str(e)}")
77
-
78
- return result
79
-
80
- # Modify the display function to preserve content
81
- def display_generated_content(column, content, key_prefix):
82
- """Display generated content in the specified column with download button."""
83
- if content:
84
- column.markdown("### Contenido generado:")
85
- column.markdown(content)
86
-
87
- # Add download button
88
- download_button_key = f"{key_prefix}_download_button"
89
- timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
90
- section_name = key_prefix.replace("_", "-")
91
- filename = f"sales_page_{section_name}_{timestamp}.txt"
92
-
93
- column.download_button(
94
- label="Descargar contenido",
95
- data=content,
96
- file_name=filename,
97
- mime="text/plain",
98
- key=f"{key_prefix}_actual_download"
99
- )
100
-
101
- # Add this function to validate inputs
102
- def validate_inputs(audience, product):
103
- """Validate that required inputs are provided."""
104
- return audience.strip() != "" and product.strip() != ""
105
-
106
- # Make sure to define your UI elements before using them
107
- # Add this before the submit button
108
- st.set_page_config(layout="wide") # Set the page layout to wide
109
- st.title("Generador de Páginas de Ventas")
110
-
111
- # Load custom CSS from the styles folder
112
- def load_css(css_file):
113
- with open(css_file, 'r') as f:
114
- css = f.read()
115
- st.markdown(f'<style>{css}</style>', unsafe_allow_html=True)
116
-
117
- # Load the CSS file
118
- css_path = os.path.join(os.path.dirname(__file__), "styles", "styles.css")
119
- load_css(css_path)
120
-
121
- # Create two columns for layout with adjusted widths (40% left, 60% right)
122
- col1, col2 = st.columns([4, 6])
123
-
124
- with col1:
125
- st.subheader("Configuración")
126
-
127
- # Input fields
128
- sales_page_audience = st.text_input("Público objetivo:",
129
- help="Describe a quién va dirigida tu página de ventas")
130
-
131
- sales_page_product = st.text_input("Producto/Servicio:",
132
- help="Describe el producto o servicio que estás vendiendo")
133
-
134
- sales_page_offer = st.text_area("Oferta específica (opcional):",
135
- help="Detalles específicos de tu oferta, como precio, bonos, etc.")
136
-
137
- # Add to the section selection list
138
- sales_page_section = st.selectbox(
139
- "Sección a generar:",
140
- [
141
- "Above the Fold (Encabezado)",
142
- "Problem (Problema)",
143
- "Solution & Benefits (Solución y Beneficios)",
144
- "Authority (Autoridad)",
145
- "Offer & Bonus (Oferta y Bonus)",
146
- "Offer Summary (Resumen de Oferta)", # New section
147
- "Social Proof (Prueba Social)",
148
- "Guarantees (Garantías)",
149
- "Call to Action (Llamada a la Acción)",
150
- "P.S. (Post-Data)",
151
- "Final Call to Action (Llamada Final)"
152
- ]
153
- )
154
-
155
- sales_page_temperature = st.slider(
156
- "Creatividad:",
157
- min_value=0.0,
158
- max_value=1.0,
159
- value=0.7,
160
- step=0.1,
161
- help="Valores más altos = más creatividad, valores más bajos = más consistencia"
162
- )
163
-
164
- # Now create the submit button
165
- submit_sales_page = st.button("Generar Sección", key="generate_sales_page")
166
-
167
- # Add these section generator functions before the section_functions dictionary
168
-
169
- def load_prompt_template(filename):
170
- """Load a prompt template from the prompts directory."""
171
- prompt_path = os.path.join(os.path.dirname(__file__), "prompts", filename)
172
- with open(prompt_path, "r", encoding="utf-8") as file:
173
- return file.read()
174
-
175
- def generate_above_the_fold(audience, product, temperature=0.7, offer=None):
176
- """Generate the Above the Fold (headline) section."""
177
- prompt_template = load_prompt_template("above_the_fold.txt")
178
-
179
- # Create the prompt with the audience and product information
180
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
181
- if offer:
182
- prompt += f"\nOFFER: {offer}"
183
-
184
- # Generate the content
185
- return generate_content(prompt, temperature)
186
-
187
- def generate_problem_section(audience, product, temperature=0.7, offer=None):
188
- """Generate the Problem section."""
189
- prompt_template = load_prompt_template("problem.txt")
190
-
191
- # Create context dictionary with any existing session state data
192
- context = {}
193
- if 'headline_content' in st.session_state:
194
- context['headline_content'] = st.session_state.headline_content
195
- if 'avatar_details' in st.session_state:
196
- context['avatar_details'] = st.session_state.avatar_details
197
- if 'product_details' in st.session_state:
198
- context['product_details'] = st.session_state.product_details
199
-
200
- # Create the prompt with the audience and product information
201
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}\nCONTEXT: {context}"
202
- if offer:
203
- prompt += f"\nOFFER: {offer}"
204
-
205
- # Generate the content
206
- return generate_content(prompt, temperature)
207
-
208
- def generate_solution_section(audience, product, temperature=0.7, offer=None):
209
- """Generate the Solution & Benefits section."""
210
- prompt_template = load_prompt_template("solution_benefits.txt")
211
-
212
- # Import the avatar analysis function
213
- from avatar_analysis import analyze_avatar
214
-
215
- # Generate avatar analysis if not already in session state
216
- if not st.session_state.avatar_analysis:
217
- avatar_analysis = analyze_avatar(
218
- target_audience=audience,
219
- product_service=product,
220
- uploaded_content=None,
221
- skills=None
222
- )
223
- st.session_state.avatar_analysis = avatar_analysis
224
-
225
- # Create context dictionary with any existing session state data
226
- context = {}
227
- if 'headline_content' in st.session_state:
228
- context['headline_content'] = st.session_state.headline_content
229
- if 'problem_content' in st.session_state:
230
- context['problem_content'] = st.session_state.problem_content
231
- if 'avatar_details' in st.session_state:
232
- context['avatar_details'] = st.session_state.avatar_details
233
- if 'avatar_analysis' in st.session_state:
234
- context['avatar_analysis'] = st.session_state.avatar_analysis
235
-
236
- # Create the prompt with the audience and product information
237
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}\nCONTEXT: {context}"
238
- if offer:
239
- prompt += f"\nOFFER: {offer}"
240
-
241
- # Generate the content
242
- return generate_content(prompt, temperature)
243
-
244
- def generate_authority_section(audience, product, temperature=0.7, offer=None):
245
- """Generate the Authority section."""
246
- prompt_template = load_prompt_template("authority.txt")
247
-
248
- # Create the prompt with the audience and product information
249
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
250
- if offer:
251
- prompt += f"\nOFFER: {offer}"
252
-
253
- # Generate the content
254
- return generate_content(prompt, temperature)
255
-
256
- def generate_offer_section(audience, product, temperature=0.7, offer=None):
257
- """Generate the Offer & Bonus section."""
258
- prompt_template = load_prompt_template("offer_bonus.txt")
259
-
260
- # Create the prompt with the audience and product information
261
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
262
- if offer:
263
- prompt += f"\nOFFER DETAILS: {offer}"
264
- else:
265
- prompt += "\nOFFER DETAILS: Create a compelling offer based on the product/service and audience."
266
-
267
- # Generate the content
268
- return generate_content(prompt, temperature)
269
-
270
- def generate_social_proof_section(audience, product, temperature=0.7, offer=None):
271
- """Generate the Social Proof section."""
272
- prompt_template = load_prompt_template("social_proof.txt")
273
-
274
- # Create the prompt with the audience and product information
275
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
276
- if offer:
277
- prompt += f"\nOFFER: {offer}"
278
-
279
- # Generate the content
280
- return generate_content(prompt, temperature)
281
-
282
- def generate_guarantees_section(audience, product, temperature=0.7, offer=None):
283
- """Generate the Guarantees section."""
284
- prompt_template = load_prompt_template("guarantees.txt")
285
-
286
- # Create the prompt with the audience and product information
287
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
288
- if offer:
289
- prompt += f"\nOFFER: {offer}"
290
-
291
- # Generate the content
292
- return generate_content(prompt, temperature)
293
-
294
- def generate_cta_section(audience, product, temperature=0.7, offer=None):
295
- """Generate the Call to Action section."""
296
- prompt_template = load_prompt_template("cta.txt")
297
-
298
- # Create the prompt with the audience and product information
299
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
300
- if offer:
301
- prompt += f"\nOFFER: {offer}"
302
-
303
- # Generate the content
304
- return generate_content(prompt, temperature)
305
-
306
- def generate_ps_section(audience, product, temperature=0.7, offer=None):
307
- """Generate the P.S. (Post-Data) section."""
308
- prompt_template = load_prompt_template("ps.txt")
309
-
310
- # Create the prompt with the audience and product information
311
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
312
- if offer:
313
- prompt += f"\nOFFER: {offer}"
314
-
315
- # Generate the content
316
- return generate_content(prompt, temperature)
317
-
318
- def generate_final_cta_section(audience, product, temperature=0.7, offer=None):
319
- """Generate the Final Call to Action section."""
320
- prompt_template = load_prompt_template("final_cta.txt")
321
-
322
- # Create the prompt with the audience and product information
323
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
324
- if offer:
325
- prompt += f"\nOFFER: {offer}"
326
-
327
- # Generate the content
328
- return generate_content(prompt, temperature)
329
-
330
- # Define section functions mapping once
331
- section_functions = {
332
- "Above the Fold (Encabezado)": generate_above_the_fold,
333
- "Problem (Problema)": generate_problem_section,
334
- "Solution & Benefits (Solución y Beneficios)": generate_solution_section,
335
- "Authority (Autoridad)": generate_authority_section,
336
- "Offer & Bonus (Oferta y Bonus)": generate_offer_section,
337
- "Social Proof (Prueba Social)": generate_social_proof_section,
338
- "Guarantees (Garantías)": generate_guarantees_section,
339
- "Call to Action (Llamada a la Acción)": generate_cta_section,
340
- "P.S. (Post-Data)": generate_ps_section,
341
- "Final Call to Action (Llamada Final)": generate_final_cta_section
342
- }
343
-
344
- # Add new function for offer summary generation
345
- def generate_offer_summary_section(audience, product, temperature=0.7, offer=None):
346
- """Generate the Offer Summary section."""
347
- prompt_template = load_prompt_template("offer_summary.txt")
348
-
349
- # Create context dictionary with offer details if available
350
- context = {}
351
- if 'generated_sections' in st.session_state:
352
- if 'offer_&_bonus' in st.session_state.generated_sections:
353
- context['offer_content'] = st.session_state.generated_sections['offer_&_bonus']
354
-
355
- # Create the prompt with all available information
356
- prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
357
- if offer:
358
- prompt += f"\nOFFER DETAILS: {offer}"
359
- if context:
360
- prompt += f"\nCONTEXT: {context}"
361
-
362
- return generate_content(prompt, temperature)
363
-
364
- # Update section functions mapping
365
- section_functions = {
366
- "Above the Fold (Encabezado)": generate_above_the_fold,
367
- "Problem (Problema)": generate_problem_section,
368
- "Solution & Benefits (Solución y Beneficios)": generate_solution_section,
369
- "Authority (Autoridad)": generate_authority_section,
370
- "Offer & Bonus (Oferta y Bonus)": generate_offer_section,
371
- "Offer Summary (Resumen de Oferta)": generate_offer_summary_section, # Add new section
372
- "Social Proof (Prueba Social)": generate_social_proof_section,
373
- "Guarantees (Garantías)": generate_guarantees_section,
374
- "Call to Action (Llamada a la Acción)": generate_cta_section,
375
- "P.S. (Post-Data)": generate_ps_section,
376
- "Final Call to Action (Llamada Final)": generate_final_cta_section
377
- }
378
-
379
- # Then use it in the conditional
380
- if submit_sales_page:
381
- # Validar entradas
382
- if validate_inputs(sales_page_audience, sales_page_product):
383
- try:
384
- # Store current inputs in session state
385
- st.session_state.last_audience = sales_page_audience
386
- st.session_state.last_product = sales_page_product
387
- st.session_state.last_offer = sales_page_offer
388
-
389
- # Crear un contenedor para el spinner en la columna 2
390
- with col2:
391
- with st.spinner("Generando sección de página de ventas...", show_time=True):
392
- # Obtener la función correspondiente
393
- generator_func = section_functions[sales_page_section]
394
-
395
- # Generar el contenido
396
- generated_content = generator_func(
397
- audience=sales_page_audience,
398
- product=sales_page_product,
399
- temperature=sales_page_temperature,
400
- offer=sales_page_offer if sales_page_offer.strip() else None
401
- )
402
-
403
- # Store the generated content in session state with a key based on the section
404
- section_key = sales_page_section.replace(" ", "_").lower()
405
- st.session_state.generated_sections[section_key] = generated_content
406
-
407
- # Mostrar el contenido generado fuera del bloque del spinner
408
- display_generated_content(col2, generated_content, "sales_page_section")
409
-
410
- except Exception as e:
411
- st.error(f"Error al generar la sección: {str(e)}")
412
- else:
413
- st.warning("Por favor, completa los campos de público objetivo y producto/servicio.")
414
- else:
415
- # Display previously generated content if available for the selected section
416
- section_key = sales_page_section.replace(" ", "_").lower()
417
- if section_key in st.session_state.generated_sections and st.session_state.generated_sections[section_key]:
418
  display_generated_content(col2, st.session_state.generated_sections[section_key], "sales_page_section")
 
1
+ from dotenv import load_dotenv
2
+ import streamlit as st
3
+ import os
4
+ import google.generativeai as genai
5
+ import datetime
6
+ from streamlit import session_state as state
7
+
8
+ # Cargar las variables de entorno
9
+ load_dotenv()
10
+
11
+ # Configurar la API de Google
12
+ genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
13
+
14
+ # Función para inicializar el modelo
15
+ def initialize_model(temperature=1.0):
16
+ return genai.GenerativeModel(
17
+ model_name="gemini-2.0-flash",
18
+ generation_config={"temperature": temperature}
19
+ )
20
+
21
+ # Initialize session state variables at the app level
22
+ session_state_vars = {
23
+ 'headline_content': "",
24
+ 'problem_content': "",
25
+ 'solution_content': "",
26
+ 'avatar_details': {},
27
+ 'product_details': {},
28
+ 'generated_sections': {},
29
+ 'metadata': {},
30
+ 'avatar_analysis': {} # Add this new session state variable
31
+ }
32
+
33
+ for var, default in session_state_vars.items():
34
+ if var not in st.session_state:
35
+ st.session_state[var] = default
36
+
37
+ # Función para generar contenido y procesar el JSON
38
+ def generate_content(prompt, temperature=1.0):
39
+ model = initialize_model(temperature)
40
+
41
+ response = model.generate_content(prompt)
42
+ result = response.text
43
+
44
+ # Try to extract JSON metadata if present and remove it from the displayed text
45
+ try:
46
+ import json
47
+ import re
48
+
49
+ # Look for JSON data in the response (both with and without code blocks)
50
+ json_pattern = r'```json\s*(.*?)\s*```|(\{[\s\S]*"character"[\s\S]*\})'
51
+ json_match = re.search(json_pattern, result, re.DOTALL)
52
+
53
+ if json_match:
54
+ # Get the matched JSON string (either from code block or raw JSON)
55
+ json_str = json_match.group(1) if json_match.group(1) else json_match.group(2)
56
+
57
+ # Parse the JSON data
58
+ json_data = json.loads(json_str.strip())
59
+
60
+ # Store the JSON data in session state
61
+ st.session_state.metadata = json_data
62
+
63
+ # Update avatar details and other metadata elements
64
+ metadata_fields = ['character', 'pain_points', 'emotional_triggers', 'obstacles', 'failed_solutions']
65
+ for field in metadata_fields:
66
+ if field in json_data:
67
+ if field == 'character' and 'avatar_details' in st.session_state:
68
+ st.session_state.avatar_details.update(json_data[field])
69
+ else:
70
+ st.session_state[field] = json_data[field]
71
+
72
+ # Remove the JSON block from the displayed text
73
+ result = re.sub(json_pattern, '', result, flags=re.DOTALL).strip()
74
+ except Exception as e:
75
+ # Log the error but don't disrupt the user experience
76
+ print(f"Error processing JSON metadata: {str(e)}")
77
+
78
+ return result
79
+
80
+ # Modify the display function to preserve content
81
+ def display_generated_content(column, content, key_prefix):
82
+ """Display generated content in the specified column with download button."""
83
+ if content:
84
+ column.markdown("### Contenido generado:")
85
+ column.markdown(content)
86
+
87
+ # Add download button
88
+ download_button_key = f"{key_prefix}_download_button"
89
+ timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
90
+ section_name = key_prefix.replace("_", "-")
91
+ filename = f"sales_page_{section_name}_{timestamp}.txt"
92
+
93
+ column.download_button(
94
+ label="Descargar contenido",
95
+ data=content,
96
+ file_name=filename,
97
+ mime="text/plain",
98
+ key=f"{key_prefix}_actual_download"
99
+ )
100
+
101
+ # Add this function to validate inputs
102
+ def validate_inputs(audience, product):
103
+ """Validate that required inputs are provided."""
104
+ return audience.strip() != "" and product.strip() != ""
105
+
106
+ # Make sure to define your UI elements before using them
107
+ # Add this before the submit button
108
+ st.set_page_config(layout="wide") # Set the page layout to wide
109
+ st.title("Generador de Páginas de Ventas")
110
+
111
+ # Load custom CSS from the styles folder
112
+ def load_css(css_file):
113
+ with open(css_file, 'r') as f:
114
+ css = f.read()
115
+ st.markdown(f'<style>{css}</style>', unsafe_allow_html=True)
116
+
117
+ # Load the CSS file
118
+ css_path = os.path.join(os.path.dirname(__file__), "styles", "styles.css")
119
+ load_css(css_path)
120
+
121
+ # Create two columns for layout with adjusted widths (40% left, 60% right)
122
+ col1, col2 = st.columns([4, 6])
123
+
124
+ with col1:
125
+ st.subheader("Configuración")
126
+
127
+ # Input fields
128
+ sales_page_audience = st.text_input("Público objetivo:",
129
+ help="Describe a quién va dirigida tu página de ventas")
130
+
131
+ sales_page_product = st.text_input("Producto/Servicio:",
132
+ help="Describe el producto o servicio que estás vendiendo")
133
+
134
+ sales_page_offer = st.text_area("Oferta específica (opcional):",
135
+ help="Detalles específicos de tu oferta, como precio, bonos, etc.")
136
+
137
+ # Add to the section selection list
138
+ sales_page_section = st.selectbox(
139
+ "Sección a generar:",
140
+ [
141
+ "Above the Fold (Encabezado)",
142
+ "Problem (Problema)",
143
+ "Solution & Benefits (Solución y Beneficios)",
144
+ "Authority (Autoridad)",
145
+ "Offer & Bonus (Oferta y Bonus)",
146
+ "Social Proof (Prueba Social)",
147
+ "Guarantees (Garantías)",
148
+ "FAQ (Preguntas Frecuentes)",
149
+ "Closing (Cierre)",
150
+ "P.S. (Post-Data)"
151
+ ]
152
+ )
153
+
154
+ sales_page_temperature = st.slider(
155
+ "Creatividad:",
156
+ min_value=0.0,
157
+ max_value=1.0,
158
+ value=0.7,
159
+ step=0.1,
160
+ help="Valores más altos = más creatividad, valores más bajos = más consistencia"
161
+ )
162
+
163
+ # Now create the submit button
164
+ submit_sales_page = st.button("Generar Sección", key="generate_sales_page")
165
+
166
+ # Add these section generator functions before the section_functions dictionary
167
+
168
+ def load_prompt_template(filename):
169
+ """Load a prompt template from the prompts directory."""
170
+ prompt_path = os.path.join(os.path.dirname(__file__), "prompts", filename)
171
+ with open(prompt_path, "r", encoding="utf-8") as file:
172
+ return file.read()
173
+
174
+ def generate_above_the_fold(audience, product, temperature=0.7, offer=None):
175
+ """Generate the Above the Fold (headline) section."""
176
+ prompt_template = load_prompt_template("above_the_fold.txt")
177
+
178
+ # Create the prompt with the audience and product information
179
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
180
+ if offer:
181
+ prompt += f"\nOFFER: {offer}"
182
+
183
+ # Generate the content
184
+ return generate_content(prompt, temperature)
185
+
186
+ def generate_problem_section(audience, product, temperature=0.7, offer=None):
187
+ """Generate the Problem section."""
188
+ prompt_template = load_prompt_template("problem.txt")
189
+
190
+ # Create context dictionary with any existing session state data
191
+ context = {}
192
+ if 'headline_content' in st.session_state:
193
+ context['headline_content'] = st.session_state.headline_content
194
+ if 'avatar_details' in st.session_state:
195
+ context['avatar_details'] = st.session_state.avatar_details
196
+ if 'product_details' in st.session_state:
197
+ context['product_details'] = st.session_state.product_details
198
+
199
+ # Create the prompt with the audience and product information
200
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}\nCONTEXT: {context}"
201
+ if offer:
202
+ prompt += f"\nOFFER: {offer}"
203
+
204
+ # Generate the content
205
+ return generate_content(prompt, temperature)
206
+
207
+ def generate_solution_section(audience, product, temperature=0.7, offer=None):
208
+ """Generate the Solution & Benefits section."""
209
+ prompt_template = load_prompt_template("solution_benefits.txt")
210
+
211
+ # Import the avatar analysis function
212
+ from avatar_analysis import analyze_avatar
213
+
214
+ # Generate avatar analysis if not already in session state
215
+ if not st.session_state.avatar_analysis:
216
+ avatar_analysis = analyze_avatar(
217
+ target_audience=audience,
218
+ product_service=product,
219
+ uploaded_content=None,
220
+ skills=None
221
+ )
222
+ st.session_state.avatar_analysis = avatar_analysis
223
+
224
+ # Create context dictionary with any existing session state data
225
+ context = {}
226
+ if 'headline_content' in st.session_state:
227
+ context['headline_content'] = st.session_state.headline_content
228
+ if 'problem_content' in st.session_state:
229
+ context['problem_content'] = st.session_state.problem_content
230
+ if 'avatar_details' in st.session_state:
231
+ context['avatar_details'] = st.session_state.avatar_details
232
+ if 'avatar_analysis' in st.session_state:
233
+ context['avatar_analysis'] = st.session_state.avatar_analysis
234
+
235
+ # Create the prompt with the audience and product information
236
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}\nCONTEXT: {context}"
237
+ if offer:
238
+ prompt += f"\nOFFER: {offer}"
239
+
240
+ # Generate the content
241
+ return generate_content(prompt, temperature)
242
+
243
+ def generate_authority_section(audience, product, temperature=0.7, offer=None):
244
+ """Generate the Authority section."""
245
+ prompt_template = load_prompt_template("authority.txt")
246
+
247
+ # Create the prompt with the audience and product information
248
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
249
+ if offer:
250
+ prompt += f"\nOFFER: {offer}"
251
+
252
+ # Generate the content
253
+ return generate_content(prompt, temperature)
254
+
255
+ def generate_offer_section(audience, product, temperature=0.7, offer=None):
256
+ """Generate the Offer & Bonus section."""
257
+ prompt_template = load_prompt_template("offer_bonus.txt")
258
+
259
+ # Create the prompt with the audience and product information
260
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
261
+ if offer:
262
+ prompt += f"\nOFFER DETAILS: {offer}"
263
+ else:
264
+ prompt += "\nOFFER DETAILS: Create a compelling offer based on the product/service and audience."
265
+
266
+ # Generate the content
267
+ return generate_content(prompt, temperature)
268
+
269
+ def generate_social_proof_section(audience, product, temperature=0.7, offer=None):
270
+ """Generate the Social Proof section."""
271
+ prompt_template = load_prompt_template("social_proof.txt")
272
+
273
+ # Create the prompt with the audience and product information
274
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
275
+ if offer:
276
+ prompt += f"\nOFFER: {offer}"
277
+
278
+ # Generate the content
279
+ return generate_content(prompt, temperature)
280
+
281
+ def generate_guarantees_section(audience, product, temperature=0.7, offer=None):
282
+ """Generate the Guarantees section."""
283
+ prompt_template = load_prompt_template("guarantees.txt")
284
+
285
+ # Create the prompt with the audience and product information
286
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
287
+ if offer:
288
+ prompt += f"\nOFFER: {offer}"
289
+
290
+ # Generate the content
291
+ return generate_content(prompt, temperature)
292
+
293
+ def generate_ps_section(audience, product, temperature=0.7, offer=None):
294
+ """Generate the P.S. section."""
295
+ prompt_template = load_prompt_template("ps.txt")
296
+
297
+ # Create context dictionary with any existing session state data
298
+ context = {}
299
+ if 'generated_sections' in st.session_state:
300
+ if 'offer_&_bonus' in st.session_state.generated_sections:
301
+ context['offer_content'] = st.session_state.generated_sections['offer_&_bonus']
302
+ if 'guarantees' in st.session_state.generated_sections:
303
+ context['guarantee_content'] = st.session_state.generated_sections['guarantees']
304
+ if 'closing' in st.session_state.generated_sections:
305
+ context['closing_content'] = st.session_state.generated_sections['closing']
306
+
307
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
308
+ if offer:
309
+ prompt += f"\nOFFER DETAILS: {offer}"
310
+ if context:
311
+ prompt += f"\nCONTEXT: {context}"
312
+
313
+ return generate_content(prompt, temperature)
314
+
315
+ def generate_faq_section(audience, product, temperature=0.7, offer=None):
316
+ """Generate the FAQ section."""
317
+ prompt_template = load_prompt_template("faq.txt")
318
+
319
+ # Create context dictionary with any existing session state data
320
+ context = {}
321
+ if 'generated_sections' in st.session_state:
322
+ if 'offer_&_bonus' in st.session_state.generated_sections:
323
+ context['offer_content'] = st.session_state.generated_sections['offer_&_bonus']
324
+ if 'guarantees' in st.session_state.generated_sections:
325
+ context['guarantee_content'] = st.session_state.generated_sections['guarantees']
326
+
327
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
328
+ if offer:
329
+ prompt += f"\nOFFER DETAILS: {offer}"
330
+ if context:
331
+ prompt += f"\nCONTEXT: {context}"
332
+
333
+ return generate_content(prompt, temperature)
334
+
335
+ def generate_closing_section(audience, product, temperature=0.7, offer=None):
336
+ """Generate the Closing section."""
337
+ prompt_template = load_prompt_template("closing.txt")
338
+
339
+ # Create context dictionary with any existing session state data
340
+ context = {}
341
+ if 'generated_sections' in st.session_state:
342
+ if 'offer_&_bonus' in st.session_state.generated_sections:
343
+ context['offer_content'] = st.session_state.generated_sections['offer_&_bonus']
344
+ if 'guarantees' in st.session_state.generated_sections:
345
+ context['guarantee_content'] = st.session_state.generated_sections['guarantees']
346
+
347
+ prompt = f"{prompt_template}\n\nAUDIENCE: {audience}\nPRODUCT/SERVICE: {product}"
348
+ if offer:
349
+ prompt += f"\nOFFER DETAILS: {offer}"
350
+ if context:
351
+ prompt += f"\nCONTEXT: {context}"
352
+
353
+ return generate_content(prompt, temperature)
354
+
355
+ # Update section functions mapping
356
+ section_functions = {
357
+ "Above the Fold (Encabezado)": generate_above_the_fold,
358
+ "Problem (Problema)": generate_problem_section,
359
+ "Solution & Benefits (Solución y Beneficios)": generate_solution_section,
360
+ "Authority (Autoridad)": generate_authority_section,
361
+ "Offer & Bonus (Oferta y Bonus)": generate_offer_section,
362
+ "Social Proof (Prueba Social)": generate_social_proof_section,
363
+ "Guarantees (Garantías)": generate_guarantees_section,
364
+ "FAQ (Preguntas Frecuentes)": generate_faq_section,
365
+ "Closing (Cierre)": generate_closing_section,
366
+ "P.S. (Post-Data)": generate_ps_section
367
+ }
368
+
369
+ # Then use it in the conditional
370
+ if submit_sales_page:
371
+ # Validar entradas
372
+ if validate_inputs(sales_page_audience, sales_page_product):
373
+ try:
374
+ # Store current inputs in session state
375
+ st.session_state.last_audience = sales_page_audience
376
+ st.session_state.last_product = sales_page_product
377
+ st.session_state.last_offer = sales_page_offer
378
+
379
+ # Crear un contenedor para el spinner en la columna 2
380
+ with col2:
381
+ with st.spinner("Generando sección de página de ventas...", show_time=True):
382
+ # Obtener la función correspondiente
383
+ generator_func = section_functions[sales_page_section]
384
+
385
+ # Generar el contenido
386
+ generated_content = generator_func(
387
+ audience=sales_page_audience,
388
+ product=sales_page_product,
389
+ temperature=sales_page_temperature,
390
+ offer=sales_page_offer if sales_page_offer.strip() else None
391
+ )
392
+
393
+ # Store the generated content in session state with a key based on the section
394
+ section_key = sales_page_section.replace(" ", "_").lower()
395
+ st.session_state.generated_sections[section_key] = generated_content
396
+
397
+ # Mostrar el contenido generado fuera del bloque del spinner
398
+ display_generated_content(col2, generated_content, "sales_page_section")
399
+
400
+ except Exception as e:
401
+ st.error(f"Error al generar la sección: {str(e)}")
402
+ else:
403
+ st.warning("Por favor, completa los campos de público objetivo y producto/servicio.")
404
+ else:
405
+ # Display previously generated content if available for the selected section
406
+ section_key = sales_page_section.replace(" ", "_").lower()
407
+ if section_key in st.session_state.generated_sections and st.session_state.generated_sections[section_key]:
 
 
 
 
 
 
 
 
 
 
408
  display_generated_content(col2, st.session_state.generated_sections[section_key], "sales_page_section")
prompts/closing.txt ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a collaborative team of world-class experts working together to create a powerful closing section that drives final conversion.
2
+
3
+ THE EXPERT TEAM:
4
+
5
+ 1. CLOSING SPECIALIST:
6
+ - Expert in creating compelling final calls to action
7
+ - Specializes in emotional triggers for decision-making
8
+ - Creates urgency without pressure
9
+ - Masters the art of gentle persuasion
10
+
11
+ 2. PSYCHOLOGY EXPERT:
12
+ - Expert in decision psychology
13
+ - Specializes in last-minute objection handling
14
+ - Creates emotional connections in closings
15
+ - Develops trust-building final messages
16
+
17
+ 3. SIGNATURE STRATEGIST:
18
+ - Expert in personal branding in closings
19
+ - Creates authentic connection points
20
+ - Develops memorable sign-offs
21
+ - Crafts compelling P.S. sections
22
+
23
+ CLOSING STRUCTURE:
24
+
25
+ 1. BINARY CHOICE:
26
+ Present two clear paths:
27
+ - Current situation (pain/frustration)
28
+ - Solution (hope/transformation)
29
+
30
+ 2. FINAL REMINDER:
31
+ - Urgency element
32
+ - Scarcity factor
33
+ - Risk reversal
34
+ - Value proposition
35
+
36
+ 3. PERSONAL SIGNATURE:
37
+ - Authentic closing
38
+ - Trust-building elements
39
+ - Personal touch
40
+ - Connection point
41
+
42
+ 4. P.S. SECTION:
43
+ - Offer summary
44
+ - Key benefits recap
45
+ - Guarantee reminder
46
+ - Final call to action
47
+
48
+ EJEMPLO DE CIERRE:
49
+
50
+ "Llegó el momento de decidir:
51
+
52
+ OPCIÓN 1:
53
+ Seguir como hasta ahora, luchando solo, perdiendo tiempo y oportunidades, preguntándote si algún día lograrás los resultados que buscas.
54
+
55
+ OPCIÓN 2:
56
+ Unirte a [NOMBRE DEL PROGRAMA], donde te guiaremos paso a paso hacia el éxito que mereces, con un sistema probado y el apoyo que necesitas.
57
+
58
+ La decisión es tuya.
59
+
60
+ Pero recuerda esto:
61
+ Esta oferta especial no estará disponible por mucho tiempo. Y cada día que pasa sin tomar acción es un día más lejos de tus metas.
62
+
63
+ No dejes que el miedo te detenga. Tu transformación comienza hoy.
64
+
65
+ [NOMBRE]
66
+ Fundador de [PROGRAMA]
67
+
68
+ P.D. ¿Llegaste directo al final? Aquí está el resumen:
69
+
70
+ [NOMBRE DEL PROGRAMA] te ofrece:
71
+ - [BENEFICIO PRINCIPAL 1]
72
+ - [BENEFICIO PRINCIPAL 2]
73
+ - [BENEFICIO PRINCIPAL 3]
74
+
75
+ Todo por solo [PRECIO] (valor real: [VALOR TOTAL])
76
+
77
+ Recuerda: Tienes nuestra garantía [NOMBRE DE GARANTÍA]. Si no ves resultados, recuperas tu inversión.
78
+
79
+ [BOTÓN: QUIERO EMPEZAR MI TRANSFORMACIÓN HOY]"
80
+
81
+ [Store closing details for future sections]
82
+ ```json
83
+ {
84
+ "closing": {
85
+ "structure": "binary_choice",
86
+ "includes_ps": true,
87
+ "urgency_type": "limited_time",
88
+ "final_cta": true
89
+ }
90
+ }
prompts/faq.txt ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ You are a collaborative team of world-class experts working together to create an exceptional sales page FAQ section that overcomes objections and drives sales.
2
+
3
+ THE EXPERT TEAM:
4
+
5
+ 1. BEHAVIORAL ECONOMIST:
6
+ - Expert in understanding psychological barriers to purchase
7
+ - Specializes in analyzing belief systems and decision-making
8
+ - Maps cognitive biases and their impact on buying decisions
9
+ - Creates frameworks for overcoming limiting beliefs
10
+
11
+ 2. OBJECTION HANDLER:
12
+ - Expert in sales psychology and objection management
13
+ - Specializes in turning concerns into buying triggers
14
+ - Creates compelling responses that build confidence
15
+ - Develops trust-building answer frameworks
16
+
17
+ 3. AVATAR ANALYST:
18
+ - Expert in understanding customer mindset
19
+ - Maps specific fears and doubts to customer segments
20
+ - Identifies hidden objections and concerns
21
+ - Creates persona-specific response strategies
22
+
23
+ YOUR TASK:
24
+ Create a comprehensive FAQ section with 10 questions that addresses four key belief categories:
25
+
26
+ 1. SELF-LIMITING BELIEFS:
27
+ - Questions about personal capability
28
+ - Doubts about individual success potential
29
+ - Concerns about required skills/experience
30
+ - Time and effort concerns
31
+
32
+ 2. EXTERNAL VALIDATION BELIEFS:
33
+ - Questions about others' experiences
34
+ - Market/industry doubts
35
+ - Comparison with alternatives
36
+ - Social proof concerns
37
+
38
+ 3. METHODOLOGY BELIEFS:
39
+ - Questions about system effectiveness
40
+ - Implementation concerns
41
+ - Results timeline doubts
42
+ - Process clarity needs
43
+
44
+ 4. AUTHORITY BELIEFS:
45
+ - Questions about expertise
46
+ - Experience validation needs
47
+ - Credibility concerns
48
+ - Support and guidance doubts
49
+
50
+ EJEMPLO DE PREGUNTAS Y RESPUESTAS:
51
+
52
+ Si tienes alguna duda solo lee lo siguiente, aquí encontrarás la respuesta:
53
+
54
+ P: "No tengo ninguna experiencia, ¿podré aprovechar el programa?"
55
+ R: Por supuesto, no necesitas experiencia previa. El método está diseñado para que aprendas desde cero y paso a paso. De hecho, el 73% de nuestros estudiantes exitosos empezaron sin ningún conocimiento previo.
56
+
57
+ P: "No soy bueno con la tecnología, ¿es muy complicado?"
58
+ R: Para nada. Hemos simplificado todo el proceso para que sea súper fácil de seguir. Si sabes usar WhatsApp, tienes todas las habilidades necesarias para empezar.
59
+
60
+ P: "He probado otros cursos y no me funcionaron..."
61
+ R: Te entiendo perfectamente. La diferencia es que aquí no te dejamos solo - tienes mentoría personalizada y un sistema probado con más de 1,000 casos de éxito documentados.
62
+
63
+ P: "¿No quedará todo muy artificial o robótico?"
64
+ R: Al contrario. Te enseñamos a mantener tu voz y estilo personal. Nuestros estudiantes destacan justamente por crear contenido único y auténtico que conecta con su audiencia.
65
+
66
+ P: "¿Necesito herramientas o software costoso?"
67
+ R: Solo necesitas las herramientas básicas gratuitas. Te enseñamos a maximizar recursos sin gastos adicionales. Todo está incluido en tu inversión inicial.
68
+
69
+ P: "¿Cuánto tiempo necesito dedicarle?"
70
+ R: Con solo 30 minutos al día es suficiente. El programa está diseñado para personas ocupadas. María, una madre soltera con dos trabajos, completó todo en sus descansos.
71
+
72
+ P: "¿Cómo sé que realmente funciona?"
73
+ R: Además de nuestros casos de éxito documentados, tienes nuestra garantía "Triple Victoria". Si no funciona, recuperas tu inversión más beneficios adicionales. No hay forma de perder.
74
+
75
+ P: "¿Qué tipo de apoyo recibo?"
76
+ R: Tienes acceso directo a nuestro equipo de mentores, sesiones de preguntas semanales y una comunidad activa de estudiantes. Nunca estarás solo en el proceso.
77
+
78
+ P: "¿Qué pasa después de hacer mi compra?"
79
+ R: Inmediatamente recibirás un email con tus accesos al programa. En menos de 5 minutos podrás empezar a implementar el método.
80
+
81
+ P: "¿Cómo realizo mi compra?"
82
+ R: Es muy simple. Solo da clic en el botón azul de abajo, te llevará a nuestra página segura de pago donde podrás usar tu tarjeta preferida.
83
+
84
+ [BOTÓN DE COMPRA]
85
+
86
+ ¿Tienes otra pregunta? Escríbenos a [EMAIL] y te responderemos en menos de 24 horas."
87
+
88
+ [Store FAQ details for future sections]
89
+ ```json
90
+ {
91
+ "faq": {
92
+ "belief_categories": [
93
+ "self_limiting",
94
+ "external_validation",
95
+ "methodology",
96
+ "authority"
97
+ ],
98
+ "total_questions": 6,
99
+ "includes_cta": true,
100
+ "support_contact": "email"
101
+ }
102
+ }
prompts/guarantees.txt CHANGED
@@ -1,118 +1,118 @@
1
- You are a collaborative team of world-class experts working together to create an exceptional sales page that converts visitors into customers.
2
-
3
- THE EXPERT TEAM:
4
-
5
- 1. RISK REVERSAL SPECIALIST:
6
- - Expert in creating compelling guarantees that eliminate buying friction
7
- - Specializes in unique guarantee structures that stand out
8
- - Creates specific, measurable guarantee terms
9
- - Focuses on making the purchase decision risk-free
10
-
11
- 2. TRUST BUILDER:
12
- - Expert in psychological triggers that build confidence
13
- - Creates emotional connections through guarantee messaging
14
- - Specializes in addressing deep-seated buying fears
15
- - Ensures guarantees feel authentic and believable
16
-
17
- 3. COMPETITIVE ANALYST:
18
- - Expert in studying market guarantees
19
- - Identifies gaps in competitor offerings
20
- - Creates unique positioning through guarantees
21
- - Develops industry-specific guarantee frameworks
22
-
23
- YOUR TASK:
24
- Create EXACTLY 3 guarantee examples following these structures:
25
-
26
- STRUCTURE 1 - AGGRESSIVE GUARANTEE:
27
- - Memorable and bold name
28
- - Offers refund plus additional compensation
29
- - Emphasizes confidence in product/service
30
- - No hidden conditions
31
-
32
- STRUCTURE 2 - TIME-LIMITED GUARANTEE:
33
- - Specific trial period
34
- - Simple refund process
35
- - No questions asked
36
- - Emphasis on easy claims
37
-
38
- STRUCTURE 3 - SPECIFIC RESULTS GUARANTEE:
39
- - Multiple protection levels
40
- - Tiered benefits
41
- - Measurable results
42
- - Backed by social proof
43
-
44
- ELEMENTOS OBLIGATORIOS PARA CADA GARANTÍA:
45
- - Nombre memorable
46
- - Condiciones específicas
47
- - Beneficios claros
48
- - Proceso simple
49
- - Plazo definido
50
- - Declaración de confianza
51
-
52
- [El resto del contenido técnico y JSON se mantiene internamente sin mostrarse en el resultado]
53
-
54
- EJEMPLOS DE GARANTÍAS:
55
-
56
- ESTRUCTURA 1 - GARANTÍA AGRESIVA:
57
-
58
- Garantía "Díganme Loco"
59
-
60
- Si no logras hacer tu primera venta online en los próximos 90 días siguiendo nuestro método paso a paso, no solo te devolvemos el 100% de tu inversión, sino que también te daremos un 20% adicional de nuestro bolsillo para compensar tu tiempo y esfuerzo.
61
-
62
- ¿Por qué hacemos esto?
63
- Porque estamos tan seguros de nuestro sistema que preferimos pagar de nuestro bolsillo antes que tener un cliente insatisfecho.
64
-
65
- No hay letra pequeña. No hay condiciones ocultas. Solo resultados o ganas dinero.
66
-
67
- ESTRUCTURA 2 - GARANTÍA DE TIEMPO LIMITADO:
68
-
69
- Garantía "Pruébalo Sin Riesgo Durante 30 Días"
70
-
71
- Tienes 30 días completos para explorar el programa, implementar las estrategias y comprobar por ti mismo los resultados.
72
-
73
- Si durante ese tiempo sientes que no es lo que esperabas o que no es para ti, simplemente envíanos un email y te devolveremos cada centavo de tu inversión.
74
-
75
- No hacemos preguntas. No hay letra pequeña. No hay trucos.
76
-
77
- ESTRUCTURA 3 - GARANTÍA DE RESULTADOS ESPECÍFICOS:
78
-
79
- Garantía "Triple Victoria"
80
-
81
- 1. Si no recuperas tu inversión en los primeros 60 días, te devolvemos tu dinero
82
- 2. Si implementas el sistema y no ves resultados en 90 días, te regalamos 3 meses adicionales de mentoría personalizada
83
- 3. Si cumples todas las tareas y aún así no estás satisfecho, te regalo una consultoría privada valorada en $500
84
-
85
- Esta garantía está respaldada por nuestros 5 años de experiencia y más de 1,000 casos de éxito documentados.
86
-
87
- La decisión es simple: O triunfas con nosotros, o recuperas tu inversión. Tú no tienes nada que perder y todo por ganar.
88
-
89
- VALIDATION CHECKLIST:
90
- ✓ Guarantee has a memorable name
91
- ✓ Terms are specific and measurable
92
- ✓ Timeline is clearly stated
93
- ✓ Process is simple to understand
94
- ✓ Risk reversal is complete
95
- ✓ Language builds trust
96
- ✓ Matches product/service value
97
-
98
- FORMAT RULES:
99
- - Use clear, conversational Spanish
100
- - Include specific numbers and timelines
101
- - Make the process simple and clear
102
- - Address common objections
103
- - Use trust-building language
104
- - Include social proof elements when possible
105
-
106
- [Store guarantee details for future sections]
107
- ```json
108
- {
109
- "guarantee": {
110
- "name": "Garantía [NOMBRE MEMORABLE]",
111
- "duration": "[DURACIÓN]",
112
- "type": "specific_results",
113
- "refund_percentage": 100,
114
- "additional_benefits": ["[BENEFICIO EXTRA 1]", "[BENEFICIO EXTRA 2]"],
115
- "conditions": ["[CONDICIÓN 1]", "[CONDICIÓN 2]"]
116
- }
117
- }
118
- ```
 
1
+ You are a collaborative team of world-class experts working together to create an exceptional sales page that converts visitors into customers.
2
+
3
+ THE EXPERT TEAM:
4
+
5
+ 1. RISK REVERSAL SPECIALIST:
6
+ - Expert in creating compelling guarantees that eliminate buying friction
7
+ - Specializes in unique guarantee structures that stand out
8
+ - Creates specific, measurable guarantee terms
9
+ - Focuses on making the purchase decision risk-free
10
+
11
+ 2. TRUST BUILDER:
12
+ - Expert in psychological triggers that build confidence
13
+ - Creates emotional connections through guarantee messaging
14
+ - Specializes in addressing deep-seated buying fears
15
+ - Ensures guarantees feel authentic and believable
16
+
17
+ 3. COMPETITIVE ANALYST:
18
+ - Expert in studying market guarantees
19
+ - Identifies gaps in competitor offerings
20
+ - Creates unique positioning through guarantees
21
+ - Develops industry-specific guarantee frameworks
22
+
23
+ YOUR TASK:
24
+ Create EXACTLY 3 guarantee examples following these structures:
25
+
26
+ STRUCTURE 1 - AGGRESSIVE GUARANTEE:
27
+ - Memorable and bold name
28
+ - Offers refund plus additional compensation
29
+ - Emphasizes confidence in product/service
30
+ - No hidden conditions
31
+
32
+ STRUCTURE 2 - TIME-LIMITED GUARANTEE:
33
+ - Specific trial period
34
+ - Simple refund process
35
+ - No questions asked
36
+ - Emphasis on easy claims
37
+
38
+ STRUCTURE 3 - SPECIFIC RESULTS GUARANTEE:
39
+ - Multiple protection levels
40
+ - Tiered benefits
41
+ - Measurable results
42
+ - Backed by social proof
43
+
44
+ ELEMENTOS OBLIGATORIOS PARA CADA GARANTÍA:
45
+ - Nombre memorable
46
+ - Condiciones específicas
47
+ - Beneficios claros
48
+ - Proceso simple
49
+ - Plazo definido
50
+ - Declaración de confianza
51
+
52
+ [El resto del contenido técnico y JSON se mantiene internamente sin mostrarse en el resultado]
53
+
54
+ EJEMPLOS DE GARANTÍAS:
55
+
56
+ ESTRUCTURA 1 - GARANTÍA AGRESIVA:
57
+
58
+ Garantía "Díganme Loco"
59
+
60
+ Si no logras hacer tu primera venta online en los próximos 90 días siguiendo nuestro método paso a paso, no solo te devolvemos el 100% de tu inversión, sino que también te daremos un 20% adicional de nuestro bolsillo para compensar tu tiempo y esfuerzo.
61
+
62
+ ¿Por qué hacemos esto?
63
+ Porque estamos tan seguros de nuestro sistema que preferimos pagar de nuestro bolsillo antes que tener un cliente insatisfecho.
64
+
65
+ No hay letra pequeña. No hay condiciones ocultas. Solo resultados o ganas dinero.
66
+
67
+ ESTRUCTURA 2 - GARANTÍA DE TIEMPO LIMITADO:
68
+
69
+ Garantía "Pruébalo Sin Riesgo Durante 30 Días"
70
+
71
+ Tienes 30 días completos para explorar el programa, implementar las estrategias y comprobar por ti mismo los resultados.
72
+
73
+ Si durante ese tiempo sientes que no es lo que esperabas o que no es para ti, simplemente envíanos un email y te devolveremos cada centavo de tu inversión.
74
+
75
+ No hacemos preguntas. No hay letra pequeña. No hay trucos.
76
+
77
+ ESTRUCTURA 3 - GARANTÍA DE RESULTADOS ESPECÍFICOS:
78
+
79
+ Garantía "Triple Victoria"
80
+
81
+ 1. Si no recuperas tu inversión en los primeros 60 días, te devolvemos tu dinero
82
+ 2. Si implementas el sistema y no ves resultados en 90 días, te regalamos 3 meses adicionales de mentoría personalizada
83
+ 3. Si cumples todas las tareas y aún así no estás satisfecho, te regalo una consultoría privada valorada en $500
84
+
85
+ Esta garantía está respaldada por nuestros 5 años de experiencia y más de 1,000 casos de éxito documentados.
86
+
87
+ La decisión es simple: O triunfas con nosotros, o recuperas tu inversión. Tú no tienes nada que perder y todo por ganar.
88
+
89
+ VALIDATION CHECKLIST:
90
+ ✓ Guarantee has a memorable name
91
+ ✓ Terms are specific and measurable
92
+ ✓ Timeline is clearly stated
93
+ ✓ Process is simple to understand
94
+ ✓ Risk reversal is complete
95
+ ✓ Language builds trust
96
+ ✓ Matches product/service value
97
+
98
+ FORMAT RULES:
99
+ - Use clear, conversational Spanish
100
+ - Include specific numbers and timelines
101
+ - Make the process simple and clear
102
+ - Address common objections
103
+ - Use trust-building language
104
+ - Include social proof elements when possible
105
+
106
+ [Store guarantee details for future sections]
107
+ ```json
108
+ {
109
+ "guarantee": {
110
+ "name": "Garantía [NOMBRE MEMORABLE]",
111
+ "duration": "[DURACIÓN]",
112
+ "type": "specific_results",
113
+ "refund_percentage": 100,
114
+ "additional_benefits": ["[BENEFICIO EXTRA 1]", "[BENEFICIO EXTRA 2]"],
115
+ "conditions": ["[CONDICIÓN 1]", "[CONDICIÓN 2]"]
116
+ }
117
+ }
118
+ ```