Spaces:
Sleeping
Sleeping
Update formulas.py
Browse files- formulas.py +42 -7
formulas.py
CHANGED
@@ -24,16 +24,51 @@ def create_offer_instruction(avatar_description, product_name, selected_formula_
|
|
24 |
examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(random_examples)])
|
25 |
|
26 |
# Add specific instructions for Sueño-Obstáculo formula
|
|
|
27 |
additional_instructions = ""
|
28 |
if selected_formula_name == "Fórmula Sueño-Obstáculo":
|
29 |
additional_instructions = """
|
30 |
-
|
31 |
-
1.
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
- "Presentamos un..."
|
38 |
- "Te ofrecemos un..."
|
39 |
- "Descubre nuestro..."
|
|
|
24 |
examples_text = "\n\n".join([f"Example {i+1}:\n{example}" for i, example in enumerate(random_examples)])
|
25 |
|
26 |
# Add specific instructions for Sueño-Obstáculo formula
|
27 |
+
# Add specific instructions for handling uploaded content
|
28 |
additional_instructions = ""
|
29 |
if selected_formula_name == "Fórmula Sueño-Obstáculo":
|
30 |
additional_instructions = """
|
31 |
+
SPECIFIC INSTRUCTIONS FOR THIS FORMULA:
|
32 |
+
1. Analyze ALL available information:
|
33 |
+
- Product/service name (product_name variable)
|
34 |
+
- Target audience description (avatar_description)
|
35 |
+
- Content from uploaded files:
|
36 |
+
* Text files (TXT, PDF, DOCX): Extract key information about the product/service and target audience
|
37 |
+
* Images (JPG, JPEG, PNG): Analyze visual elements that provide context about the product or audience
|
38 |
+
|
39 |
+
2. When working with uploaded content:
|
40 |
+
- For text files: Extract and incorporate relevant details about:
|
41 |
+
* Product features and benefits
|
42 |
+
* Target audience characteristics
|
43 |
+
* Pain points and challenges
|
44 |
+
* Desired outcomes
|
45 |
+
- For images: Consider visual elements that might inform:
|
46 |
+
* Product presentation
|
47 |
+
* Target audience demographics
|
48 |
+
* Context of use
|
49 |
+
* Visual benefits or results
|
50 |
+
|
51 |
+
3. IMPORTANT: NEVER change the name of the product/service provided in product_name. Use it EXACTLY as written.
|
52 |
+
|
53 |
+
4. If product_name contains a full phrase like "Un curso llamado Inglés sin problemas", extract only the real name ("Inglés sin problemas") and keep that exact name.
|
54 |
+
|
55 |
+
5. Create a comprehensive offer by combining:
|
56 |
+
- Information from the product_name
|
57 |
+
- Details from avatar_description
|
58 |
+
- Relevant content from uploaded files
|
59 |
+
- Visual insights from uploaded images (if any)
|
60 |
+
|
61 |
+
6. The dream should be ambitious but believable, incorporating:
|
62 |
+
- Explicit goals mentioned in uploaded content
|
63 |
+
- Target audience desires from avatar_description
|
64 |
+
- Visual aspirations shown in images (if applicable)
|
65 |
+
|
66 |
+
7. The obstacle should reflect:
|
67 |
+
- Real problems mentioned in uploaded text
|
68 |
+
- Challenges described in avatar_description
|
69 |
+
- Visual pain points shown in images (if applicable)
|
70 |
+
|
71 |
+
8. IMPORTANT: Vary the way you start the phrase. Instead of always using "Se trata de un...", use different openings such as:
|
72 |
- "Presentamos un..."
|
73 |
- "Te ofrecemos un..."
|
74 |
- "Descubre nuestro..."
|