Spaces:
Sleeping
Sleeping
Update formulas.py
Browse files- formulas.py +1 -189
formulas.py
CHANGED
@@ -1,192 +1,4 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
OBJECTIVE:
|
4 |
-
- Generate a convincing offer in Spanish
|
5 |
-
- Connect emotionally with the audience
|
6 |
-
- Address real desires, problems, and motivations
|
7 |
-
- Maintain natural and conversational language
|
8 |
-
|
9 |
-
CRITICAL OUTPUT RULES:
|
10 |
-
- Output ONLY the offer itself with NO introductory text, explanations, or additional commentary
|
11 |
-
- Start directly with the attention hook or opening phrase
|
12 |
-
- The entire response should be ONLY the offer itself following the formula structure
|
13 |
-
- Do not include phrases like "Aqu铆 tienes una oferta convincente" or "Esta es tu oferta"
|
14 |
-
- Do not use any special formatting, markdown, or HTML tags
|
15 |
-
- Do not add any characters that could trigger text box formatting
|
16 |
-
"""
|
17 |
-
|
18 |
-
def create_offer_instruction(avatar_description, product_name, selected_formula_name):
|
19 |
-
"""
|
20 |
-
Creates instructions for generating an offer based on the selected formula.
|
21 |
-
|
22 |
-
Args:
|
23 |
-
avatar_description: Description of the target audience
|
24 |
-
product_name: Name of the product or service
|
25 |
-
selected_formula_name: Name of the formula to use
|
26 |
-
|
27 |
-
Returns:
|
28 |
-
str: Complete instruction for generating the offer
|
29 |
-
"""
|
30 |
-
# Get the selected formula
|
31 |
-
selected_formula = offer_formulas[selected_formula_name]
|
32 |
-
|
33 |
-
# Add specific instructions for each formula
|
34 |
-
additional_instructions = ""
|
35 |
-
if selected_formula_name == "F贸rmula Sue帽o-Obst谩culo":
|
36 |
-
additional_instructions = """
|
37 |
-
SPECIFIC INSTRUCTIONS FOR THIS FORMULA:
|
38 |
-
1. PRODUCT/SERVICE NAME HANDLING:
|
39 |
-
- CRITICAL: If a product name is provided, YOU MUST USE THAT EXACT NAME. This is non-negotiable.
|
40 |
-
- If the product name is not empty, use it EXACTLY as provided with no modifications
|
41 |
-
- Only create a new name if no product name is provided or it contains generic placeholders
|
42 |
-
|
43 |
-
2. Analyze ALL available information:
|
44 |
-
- Product/service name (use the name provided)
|
45 |
-
- Target audience description (avatar_description)
|
46 |
-
- Content from uploaded files (if any)
|
47 |
-
|
48 |
-
3. Determine the most appropriate type (curso, webinar, entrenamiento, etc.) based on:
|
49 |
-
- Any type mentioned in product_name
|
50 |
-
- The nature of the solution described in avatar_description
|
51 |
-
- The most suitable format for the target audience's needs
|
52 |
-
|
53 |
-
4. Create a comprehensive offer by combining:
|
54 |
-
- The appropriate type (determined in step 3)
|
55 |
-
- The EXACT product name as provided (if available)
|
56 |
-
- A compelling dream based on avatar_description
|
57 |
-
- A relevant obstacle based on avatar_description
|
58 |
-
|
59 |
-
5. The dream should be ambitious but believable, incorporating:
|
60 |
-
- Target audience desires from avatar_description
|
61 |
-
- Explicit goals mentioned in uploaded content (if any)
|
62 |
-
|
63 |
-
6. The obstacle should reflect:
|
64 |
-
- Real problems mentioned in avatar_description
|
65 |
-
- Challenges that would normally prevent achieving the dream
|
66 |
-
|
67 |
-
7. IMPORTANT: Vary the way you start the phrase. Instead of always using "Se trata de un...", use different openings such as:
|
68 |
-
- "Presentamos un..."
|
69 |
-
- "Te ofrecemos un..."
|
70 |
-
- "Descubre nuestro..."
|
71 |
-
- "Conoce el..."
|
72 |
-
- "Hemos creado un..."
|
73 |
-
- "Imagina tener acceso a un..."
|
74 |
-
- "Por fin existe un..."
|
75 |
-
- "Ahora puedes acceder a un..."
|
76 |
-
- "Tenemos para ti un..."
|
77 |
-
- "Disfruta de un..."
|
78 |
-
"""
|
79 |
-
|
80 |
-
elif selected_formula_name == "Oferta Dorada":
|
81 |
-
additional_instructions = """
|
82 |
-
SPECIFIC INSTRUCTIONS FOR THIS FORMULA:
|
83 |
-
1. PRODUCT/SERVICE NAME HANDLING:
|
84 |
-
- CRITICAL: If a product name is provided, YOU MUST USE THAT EXACT NAME in one of the three lines of the offer.
|
85 |
-
- If a product name is provided, use it EXACTLY as provided with no modifications
|
86 |
-
- If no product name is provided, DO NOT create or add ANY name
|
87 |
-
- DO NOT invent names like "ProExpert", "Sistema Profesional", "m茅todo XYZ", etc.
|
88 |
-
- DO NOT add product names like "curso", "programa", etc. unless they were explicitly provided
|
89 |
-
- For the third line, use generic terms like "Con nuestra metodolog铆a", "Mediante este sistema",
|
90 |
-
"Gracias a este m茅todo", etc. when no specific name is provided
|
91 |
-
|
92 |
-
2. FOLLOW THE 6-STEP PROCESS FOR CREATING AN IRRESISTIBLE OFFER:
|
93 |
-
|
94 |
-
STEP 1: IDENTIFY THE MAIN PROBLEM (ATTENTION HOOK)
|
95 |
-
- Analyze the avatar_description DEEPLY to understand their specific pain points
|
96 |
-
- Create a powerful hook that directly addresses their biggest frustration or anxiety
|
97 |
-
- Use statements that make them think "this person understands my situation exactly"
|
98 |
-
- Focus on the emotional impact of their problem, not just the practical aspects
|
99 |
-
- The hook must create an immediate emotional connection
|
100 |
-
- IMPORTANT: Be creative and varied in your approach
|
101 |
-
|
102 |
-
STEP 2: CRAFT A QUANTIFIABLE VALUE PROMISE
|
103 |
-
- Write a promise COMPLETELY IN CAPITAL LETTERS that includes:
|
104 |
-
* Concrete numbers (money, time, results)
|
105 |
-
* Powerful action verbs (EARN, MULTIPLY, ACHIEVE, MASTER)
|
106 |
-
* Specific timeframes (EN 30 D脥AS, EN SOLO 2 SEMANAS)
|
107 |
-
* Clear effort indicators (CON SOLO 15 MINUTOS DIARIOS)
|
108 |
-
- Follow this structure: C脫MO [LOGRAR RESULTADO DESEADO] SIN [OBJECI脫N O CREENCIA LIMITANTE]
|
109 |
-
- NEVER use exclamation marks (!) in this section
|
110 |
-
- Make the promise both ambitious and believable
|
111 |
-
- AVOID GENERIC PHRASES like "al otro nivel", "en tiempo r茅cord", "como nunca antes", "revolucionario"
|
112 |
-
- Instead, use SPECIFIC, MEASURABLE language that clearly states the exact benefit
|
113 |
-
|
114 |
-
STEP 3: DEMONSTRATE TRUST AND AUTHORITY
|
115 |
-
- Include elements that prove your system works:
|
116 |
-
* Personal results ("As铆 como he vendido m谩s de $250,000 USD")
|
117 |
-
* Client results ("Mis clientes han vendido m谩s de $5,000,000")
|
118 |
-
* Social proof (testimonials, case studies)
|
119 |
-
- Establish credibility through specific numbers and verifiable claims
|
120 |
-
- Connect your authority directly to the promised result
|
121 |
-
|
122 |
-
STEP 4: REDUCE DELIVERY TIME
|
123 |
-
- Clearly state how quickly they will see results
|
124 |
-
- Make the timeframe specific and believable
|
125 |
-
- Emphasize speed without sacrificing quality
|
126 |
-
- Use phrases like "en solo X d铆as" or "desde la primera semana"
|
127 |
-
- IMPORTANT: This refers to when they'll see RESULTS, not how long they need to work
|
128 |
-
- Examples: "ver谩s resultados en 30 d铆as", "transformaci贸n completa en 8 semanas"
|
129 |
-
|
130 |
-
STEP 5: MINIMIZE CLIENT EFFORT
|
131 |
-
- Address the fear of complicated processes
|
132 |
-
- CLEARLY specify the exact effort required from the client:
|
133 |
-
* Time commitment: "con solo 15 minutos al d铆a"
|
134 |
-
* Frequency: "practicando 3 veces por semana"
|
135 |
-
* Complexity: "siguiendo 5 pasos sencillos"
|
136 |
-
* Prerequisites: "sin necesidad de experiencia previa"
|
137 |
-
- Make the implementation process seem accessible and straightforward
|
138 |
-
- Emphasize the low effort-to-results ratio
|
139 |
-
- Examples: "dedicando solo 20 minutos diarios", "con 3 ejercicios simples"
|
140 |
-
|
141 |
-
STEP 6: COMBINE ALL ELEMENTS INTO A COHESIVE OFFER
|
142 |
-
- Ensure all elements address the SAME core problem
|
143 |
-
- Create a LOGICAL PROGRESSION from problem to solution to implementation
|
144 |
-
- Maintain thematic consistency throughout the entire offer
|
145 |
-
- Be SPECIFIC and CONCRETE - avoid generic superlatives and clich茅s
|
146 |
-
- Use PRECISE language that creates a clear mental image
|
147 |
-
- BANNED PHRASES: "al otro nivel", "en tiempo r茅cord", "como nunca antes",
|
148 |
-
"revolucionario", "incre铆ble", "asombroso", "el mejor", "煤nico"
|
149 |
-
"""
|
150 |
-
# Create the instruction using the system prompt at the beginning
|
151 |
-
instruction = f"""{offer_system_prompt}
|
152 |
-
|
153 |
-
FORMULA TO USE:
|
154 |
-
{selected_formula["description"]}
|
155 |
-
|
156 |
-
{additional_instructions}
|
157 |
-
|
158 |
-
PRODUCT/SERVICE:
|
159 |
-
{product_name}
|
160 |
-
|
161 |
-
TARGET AUDIENCE:
|
162 |
-
{avatar_description}
|
163 |
-
|
164 |
-
Create a compelling offer following the formula structure exactly.
|
165 |
-
"""
|
166 |
-
|
167 |
-
# Add examples if available
|
168 |
-
if selected_formula.get("examples") and len(selected_formula["examples"]) > 0:
|
169 |
-
examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(selected_formula["examples"][:3])])
|
170 |
-
instruction += f"\n\nGet inspired by these examples:\n{examples_text}"
|
171 |
-
|
172 |
-
return instruction
|
173 |
-
|
174 |
-
# Create main offer instruction
|
175 |
-
main_offer_instruction = create_offer_instruction(avatar_description, product_name, selected_formula_name)
|
176 |
-
|
177 |
-
# Create bonus instruction if requested
|
178 |
-
bonus_instruction = None
|
179 |
-
if include_bonuses:
|
180 |
-
# Import the bonus generator from the new module
|
181 |
-
from bonuses.generator import create_bonus_instruction
|
182 |
-
bonus_instruction = create_bonus_instruction(avatar_description, product_name, selected_formula_name)
|
183 |
-
|
184 |
-
return {
|
185 |
-
"main_offer_instruction": main_offer_instruction,
|
186 |
-
"bonus_instruction": bonus_instruction
|
187 |
-
}
|
188 |
-
|
189 |
-
# The rest of your offer_formulas dictionary remains unchanged
|
190 |
offer_formulas = {
|
191 |
"Oferta Dorada": {
|
192 |
"description": """
|
|
|
1 |
+
# Dictionary of offer formulas with their descriptions and examples
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
offer_formulas = {
|
3 |
"Oferta Dorada": {
|
4 |
"description": """
|