Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files- app.py +2 -1
- formulas.py +39 -0
- prompts.py +5 -4
app.py
CHANGED
@@ -200,7 +200,8 @@ with col2:
|
|
200 |
instruction = create_offer_instruction(
|
201 |
avatar_description=avatar_description,
|
202 |
product_name=product_name,
|
203 |
-
selected_formula_name=st.session_state.formula_type
|
|
|
204 |
)
|
205 |
|
206 |
# Add additional context based on input type
|
|
|
200 |
instruction = create_offer_instruction(
|
201 |
avatar_description=avatar_description,
|
202 |
product_name=product_name,
|
203 |
+
selected_formula_name=st.session_state.formula_type,
|
204 |
+
offer_formulas=offer_formulas # Pass the offer_formulas dictionary
|
205 |
)
|
206 |
|
207 |
# Add additional context based on input type
|
formulas.py
CHANGED
@@ -178,12 +178,51 @@ This is the most important part. You must create a specific, quantifiable promis
|
|
178 |
#### 3 **Benefit + Authority + Time or Effort**
|
179 |
In this part, we explain the result they will obtain, supported by an authority factor (proven method, studies, experience, validations) and establishing a time frame or necessary effort to achieve it.
|
180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
**Structure Formats:**
|
|
|
182 |
1. "[Feature] para que puedas [Benefit] con lo que [Meaning]"
|
183 |
2. "Con [Feature] podrás [Benefit] permitiéndote [Meaning]"
|
184 |
3. "Gracias a [Feature] lograrás [Benefit] haciendo que [Meaning]"
|
185 |
4. "Mediante [Feature] conseguirás [Benefit] lo que significa [Meaning]"
|
186 |
5. "Usando [Feature] alcanzarás [Benefit] transformando [Meaning]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
|
188 |
**Incorrect example:**
|
189 |
"Grow your business with our strategy." (Doesn't say how long it will take or how reliable the strategy is).
|
|
|
178 |
#### 3 **Benefit + Authority + Time or Effort**
|
179 |
In this part, we explain the result they will obtain, supported by an authority factor (proven method, studies, experience, validations) and establishing a time frame or necessary effort to achieve it.
|
180 |
|
181 |
+
# Fórmulas con ejemplos y explicaciones
|
182 |
+
# Only keep the offer_formulas dictionary in this file
|
183 |
+
|
184 |
+
offer_formulas = {
|
185 |
+
"La Fórmula 3 en 1": {
|
186 |
+
"description": """
|
187 |
+
Formula: [Feature + Benefit + Meaning]
|
188 |
+
|
189 |
+
This formula creates an instant connection by linking three key elements:
|
190 |
+
|
191 |
+
1. Feature: The main characteristic or aspect of your offer
|
192 |
+
2. Benefit: What it allows the user to achieve or obtain
|
193 |
+
3. Meaning: The deeper impact or transformation in their life
|
194 |
+
|
195 |
+
**Instructions for Creating Connection Bullets:**
|
196 |
+
|
197 |
+
1. Identify Your Core Feature:
|
198 |
+
- What makes your offer unique?
|
199 |
+
- What's the main characteristic?
|
200 |
+
- What's the standout element?
|
201 |
+
|
202 |
+
2. Transform into Benefits:
|
203 |
+
- How does this feature help them?
|
204 |
+
- What can they achieve with it?
|
205 |
+
- What becomes possible?
|
206 |
+
|
207 |
+
3. Add Deeper Meaning:
|
208 |
+
- How does it transform their life?
|
209 |
+
- What's the emotional impact?
|
210 |
+
- What does it mean for their identity?
|
211 |
+
|
212 |
**Structure Formats:**
|
213 |
+
|
214 |
1. "[Feature] para que puedas [Benefit] con lo que [Meaning]"
|
215 |
2. "Con [Feature] podrás [Benefit] permitiéndote [Meaning]"
|
216 |
3. "Gracias a [Feature] lograrás [Benefit] haciendo que [Meaning]"
|
217 |
4. "Mediante [Feature] conseguirás [Benefit] lo que significa [Meaning]"
|
218 |
5. "Usando [Feature] alcanzarás [Benefit] transformando [Meaning]"
|
219 |
+
""",
|
220 |
+
"examples": [
|
221 |
+
# Examples remain unchanged
|
222 |
+
]
|
223 |
+
},
|
224 |
+
# Other formulas remain unchanged
|
225 |
+
}
|
226 |
|
227 |
**Incorrect example:**
|
228 |
"Grow your business with our strategy." (Doesn't say how long it will take or how reliable the strategy is).
|
prompts.py
CHANGED
@@ -16,17 +16,18 @@ CRITICAL OUTPUT RULES:
|
|
16 |
- Do not include phrases like "Aquí tienes una oferta convincente" or "Esta es tu oferta"
|
17 |
"""
|
18 |
|
19 |
-
#
|
20 |
-
from formulas import offer_formulas
|
21 |
|
22 |
-
def create_offer_instruction(avatar_description, product_name, selected_formula_name):
|
23 |
"""
|
24 |
Creates instructions for generating an offer based on the selected formula.
|
25 |
|
26 |
Args:
|
27 |
avatar_description: Description of the target audience
|
28 |
product_name: Name of the product or service
|
29 |
-
selected_formula_name: Name of the formula to use
|
|
|
30 |
|
31 |
Returns:
|
32 |
str: Complete instruction for generating the offer
|
|
|
16 |
- Do not include phrases like "Aquí tienes una oferta convincente" or "Esta es tu oferta"
|
17 |
"""
|
18 |
|
19 |
+
# Remove the circular import
|
20 |
+
# from formulas import offer_formulas
|
21 |
|
22 |
+
def create_offer_instruction(avatar_description, product_name, selected_formula_name, offer_formulas=None):
|
23 |
"""
|
24 |
Creates instructions for generating an offer based on the selected formula.
|
25 |
|
26 |
Args:
|
27 |
avatar_description: Description of the target audience
|
28 |
product_name: Name of the product or service
|
29 |
+
selected_formula_name: Name of the formula to use
|
30 |
+
offer_formulas: Dictionary containing the formulas (passed from app.py)
|
31 |
|
32 |
Returns:
|
33 |
str: Complete instruction for generating the offer
|