Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -489,7 +489,7 @@ def generate_headlines(number_of_headlines, target_audience, product, temperatur
|
|
489 |
}
|
490 |
|
491 |
# Incluir las instrucciones del sistema en el prompt principal
|
492 |
-
system_prompt = """You are a world-class copywriter, with expertise in crafting hooks, headlines, and subject lines that immediately capture the reader's attention, prompting them to open the email or continue reading.
|
493 |
|
494 |
FORMAT RULES:
|
495 |
- Each headline must start with number and period
|
@@ -499,6 +499,13 @@ FORMAT RULES:
|
|
499 |
- Avoid unnecessary : symbols
|
500 |
- Each headline must be a complete and intriguing sentence
|
501 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
502 |
FORMAT EXAMPLE:
|
503 |
1. Titular 1.
|
504 |
|
@@ -516,21 +523,28 @@ IMPORTANT:
|
|
516 |
- Maintain an intriguing but credible tone
|
517 |
- Adapt speaking language from the audience
|
518 |
- Focus on transformative benefits
|
519 |
-
- Follow the selected angle style
|
520 |
|
521 |
# Iniciar el prompt con las instrucciones del sistema
|
522 |
headlines_instruction = f"{system_prompt}\n\n"
|
523 |
|
524 |
# Añadir instrucciones de ángulo solo si no es "NINGUNO"
|
525 |
if selected_angle != "NINGUNO":
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
534 |
|
535 |
headlines_instruction += (
|
536 |
f"\nTu tarea es crear {number_of_headlines} titulares irresistibles para {target_audience} "
|
@@ -575,8 +589,16 @@ IMPORTANT:
|
|
575 |
|
576 |
headlines_instruction += f"FÓRMULA A SEGUIR:\n{selected_formula['description']}\n\n"
|
577 |
|
578 |
-
headlines_instruction += "
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
|
581 |
chat_session = model.start_chat(
|
582 |
history=[
|
|
|
489 |
}
|
490 |
|
491 |
# Incluir las instrucciones del sistema en el prompt principal
|
492 |
+
system_prompt = f"""You are a world-class copywriter, with expertise in crafting hooks, headlines, and subject lines that immediately capture the reader's attention, prompting them to open the email or continue reading.
|
493 |
|
494 |
FORMAT RULES:
|
495 |
- Each headline must start with number and period
|
|
|
499 |
- Avoid unnecessary : symbols
|
500 |
- Each headline must be a complete and intriguing sentence
|
501 |
|
502 |
+
IMPORTANT ANGLE INSTRUCTIONS:
|
503 |
+
- The selected angle MUST be applied to EVERY headline
|
504 |
+
- The angle modifies HOW the formula is expressed, not its structure
|
505 |
+
- Think of the angle as a "tone overlay" on the formula
|
506 |
+
- The formula provides the structure, the angle provides the style
|
507 |
+
- Both must work together seamlessly
|
508 |
+
|
509 |
FORMAT EXAMPLE:
|
510 |
1. Titular 1.
|
511 |
|
|
|
523 |
- Maintain an intriguing but credible tone
|
524 |
- Adapt speaking language from the audience
|
525 |
- Focus on transformative benefits
|
526 |
+
- Follow the selected angle style while maintaining formula structure"""
|
527 |
|
528 |
# Iniciar el prompt con las instrucciones del sistema
|
529 |
headlines_instruction = f"{system_prompt}\n\n"
|
530 |
|
531 |
# Añadir instrucciones de ángulo solo si no es "NINGUNO"
|
532 |
if selected_angle != "NINGUNO":
|
533 |
+
headlines_instruction += f"""
|
534 |
+
ÁNGULO PRINCIPAL: {selected_angle}
|
535 |
+
INSTRUCCIONES DE ÁNGULO ESPECÍFICAS:
|
536 |
+
{angle_instructions[selected_angle]}
|
537 |
+
|
538 |
+
IMPORTANTE: El ángulo {selected_angle} debe aplicarse como una "capa de estilo" sobre la estructura de la fórmula:
|
539 |
+
1. Mantén la estructura base de la fórmula intacta
|
540 |
+
2. Aplica el tono y estilo del ángulo {selected_angle}
|
541 |
+
3. Asegura que cada elemento de la fórmula refleje el ángulo
|
542 |
+
4. El ángulo afecta al "cómo" se dice, no al "qué" se dice
|
543 |
+
|
544 |
+
EJEMPLOS EXITOSOS DEL ÁNGULO {selected_angle}:
|
545 |
+
"""
|
546 |
+
for example in angle_examples[selected_angle]:
|
547 |
+
headlines_instruction += f"- {example}\n"
|
548 |
|
549 |
headlines_instruction += (
|
550 |
f"\nTu tarea es crear {number_of_headlines} titulares irresistibles para {target_audience} "
|
|
|
589 |
|
590 |
headlines_instruction += f"FÓRMULA A SEGUIR:\n{selected_formula['description']}\n\n"
|
591 |
|
592 |
+
headlines_instruction += f"""
|
593 |
+
RECORDATORIO FINAL:
|
594 |
+
1. Sigue la estructura de la fórmula seleccionada
|
595 |
+
2. Aplica el ángulo como una "capa de estilo"
|
596 |
+
3. Mantén la coherencia entre fórmula y ángulo
|
597 |
+
4. Asegura que cada titular refleje ambos elementos
|
598 |
+
|
599 |
+
GENERA AHORA:
|
600 |
+
Crea {number_of_headlines} titulares que sigan fielmente el estilo y estructura de los ejemplos mostrados.
|
601 |
+
"""
|
602 |
|
603 |
chat_session = model.start_chat(
|
604 |
history=[
|