Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,22 @@ def get_random_product_mention():
|
|
16 |
probabilities = [0.34, 0.33, 0.33]
|
17 |
return random.choices(mentions, probabilities)[0]
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
# System Prompt - Instrucci贸n en ingl茅s para el modelo
|
20 |
system_instruction = """
|
21 |
You are a world-class copywriter, expert in creating benefits that connect symptoms with problems. You deeply understand the emotions, desires, and challenges of a specific audience, allowing you to design personalized marketing strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and creating a powerful connection.
|
@@ -41,7 +57,7 @@ def get_gemini_response_bullets(target_audience, product, num_bullets, creativit
|
|
41 |
* The Truth: 'The truth that you've never been told in school, or at home, about how to make a living from music.'
|
42 |
* Asking a Question: 'Did you know that...'
|
43 |
* When: 'When is it a good idea to tell a girl you like her? If you don't say it at that moment, say goodbye to getting to know her intimately.'
|
44 |
-
|
45 |
"""
|
46 |
|
47 |
response = model.generate_content([full_prompt])
|
|
|
16 |
probabilities = [0.34, 0.33, 0.33]
|
17 |
return random.choices(mentions, probabilities)[0]
|
18 |
|
19 |
+
# Crear la instrucci贸n de menci贸n basada en la opci贸n seleccionada
|
20 |
+
def get_mention_instruction(product_mention, product):
|
21 |
+
if product_mention == "Directa":
|
22 |
+
return f"""
|
23 |
+
Directly introduce the product '{product}' as the clear solution to the problem the reader is facing. Ensure that the product is presented in a way that highlights its key benefits and demonstrates how it directly addresses the issue at hand. The mention should feel natural and seamlessly integrated into the narrative.
|
24 |
+
"""
|
25 |
+
elif product_mention == "Indirecta":
|
26 |
+
return f"""
|
27 |
+
Subtly reference the product '{product}' as a potential solution to the reader's problem without naming it explicitly. Weave the product's core benefits into the description of how the reader can overcome the issue, creating an implicit connection between the solution and the product. Ensure the mention is subtle but clear enough to guide the reader towards the product.
|
28 |
+
"""
|
29 |
+
elif product_mention == "Metaf贸rica":
|
30 |
+
return f"""
|
31 |
+
Introduce the product '{product}' using a metaphor, connecting it symbolically to the solution the reader needs. The metaphor should relate to the problem being discussed and should creatively suggest how the product offers a resolution without explicitly stating its name. The metaphor should evoke the benefits of the product in a memorable and thought-provoking way.
|
32 |
+
"""
|
33 |
+
return ""
|
34 |
+
|
35 |
# System Prompt - Instrucci贸n en ingl茅s para el modelo
|
36 |
system_instruction = """
|
37 |
You are a world-class copywriter, expert in creating benefits that connect symptoms with problems. You deeply understand the emotions, desires, and challenges of a specific audience, allowing you to design personalized marketing strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and creating a powerful connection.
|
|
|
57 |
* The Truth: 'The truth that you've never been told in school, or at home, about how to make a living from music.'
|
58 |
* Asking a Question: 'Did you know that...'
|
59 |
* When: 'When is it a good idea to tell a girl you like her? If you don't say it at that moment, say goodbye to getting to know her intimately.'
|
60 |
+
{mention_instruction}.
|
61 |
"""
|
62 |
|
63 |
response = model.generate_content([full_prompt])
|