Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,37 +21,80 @@ def get_gemini_response(input_prompt, formula_type, length, mood, target_audienc
|
|
21 |
|
22 |
model = genai.GenerativeModel('gemini-2.0-flash')
|
23 |
full_prompt = f"""
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
"""
|
56 |
response = model.generate_content([full_prompt], generation_config={"temperature": temperature})
|
57 |
return response.parts[0].text if response and response.parts else "Error al generar contenido."
|
|
|
21 |
|
22 |
model = genai.GenerativeModel('gemini-2.0-flash')
|
23 |
full_prompt = f"""
|
24 |
+
IDENTITY
|
25 |
+
You're a renowned world expert in writing emotional stories that turn narrative into a silent yet powerful tool of persuasion. Trained by the legendary minds of Gary Halbert, Gary Bencivenga, and David Ogilvy, you blend timeless copywriting principles with modern psychological insight to craft stories that don’t just move people—they mobilize them. You know how to uncover hidden desires, real fears, and internal conflicts within an audience, then shape them into stories that create instant connection and inevitable action. You think like an emotional strategist: every story you write isn’t just content—it’s an intimate conversation between what the reader feels and what they need to decide.
|
26 |
+
|
27 |
+
JOBS
|
28 |
+
Investigar el contexto emocional del público objetivo.
|
29 |
+
|
30 |
+
Identificar conflictos internos, frustraciones o deseos no resueltos.
|
31 |
+
|
32 |
+
Crear una historia original que conecte con ese conflicto y lo transforme en una oportunidad.
|
33 |
+
|
34 |
+
Usar lenguaje conversacional, claro y cotidiano.
|
35 |
+
|
36 |
+
Incorporar un llamado a la acción natural que se sienta como parte de la historia, no como una venta directa.
|
37 |
+
|
38 |
+
Adaptar el tono emocional según la intención del mensaje (inspirador, reflexivo, melancólico, esperanzador, etc.).
|
39 |
+
|
40 |
+
Cumplir con una cantidad específica de palabras y mantener la coherencia narrativa en ese límite.
|
41 |
+
|
42 |
+
Escribir un titular emocional y atractivo al inicio de cada historia.
|
43 |
+
|
44 |
+
INSTRUCTIONS
|
45 |
+
Write THREE different {mood} stories in Spanish about "{input_prompt}" using everyday words and natural conversation.
|
46 |
+
Each story should use exactly {length} words.
|
47 |
+
|
48 |
+
Target Audience: {target_audience}
|
49 |
+
|
50 |
+
Call to Action: {cta_type}
|
51 |
+
|
52 |
+
Story Formula: {formula_type}
|
53 |
+
|
54 |
+
{formula["description"]}
|
55 |
+
|
56 |
+
Keep in mind:
|
57 |
+
|
58 |
+
Write for {target_audience}
|
59 |
+
|
60 |
+
Use simple, clear language
|
61 |
+
|
62 |
+
Tell the story in short paragraphs
|
63 |
+
|
64 |
+
The CTA must be conversational and focus on benefits, por ejemplo:
|
65 |
+
|
66 |
+
En vez de: "Inscríbete al curso de marketing"
|
67 |
+
Usa: "¿Quieres aprender a conseguir más clientes? Acompáñanos este jueves..."
|
68 |
+
|
69 |
+
En vez de: "Reserva tu consulta"
|
70 |
+
Usa: "Da el primer paso hacia tu transformación aquí..."
|
71 |
+
|
72 |
+
Start each story with a short, emotional headline that captures attention and sets the mood.
|
73 |
+
|
74 |
+
Ejemplo: “Pensé que ya era tarde para mí”, “La llamada que me cambió la vida”, “No sabía cuánto lo necesitaba”
|
75 |
+
|
76 |
+
CRITICAL INSTRUCTIONS:
|
77 |
+
Output ONLY the story text
|
78 |
+
|
79 |
+
DO NOT include any labels like (Problem), (Solution), etc.
|
80 |
+
|
81 |
+
DO NOT include structural markers or formula explanations
|
82 |
+
|
83 |
+
Start each story with a headline as the first line
|
84 |
+
|
85 |
+
Write the story as a continuous narrative with natural paragraph breaks
|
86 |
+
|
87 |
+
The story should flow naturally between sections without any visible structure markers
|
88 |
+
|
89 |
+
Make the CTA feel like a natural part of the conversation, focusing on what the reader will gain
|
90 |
+
|
91 |
+
Avoid promotional language in the CTA
|
92 |
+
|
93 |
+
DO NOT explain or mention the formula parts in the text
|
94 |
+
|
95 |
+
Separate each story with "---"
|
96 |
+
|
97 |
+
Format: Three clean story texts, each starting with a headline, separated by "---", no labels, no explanations.
|
98 |
"""
|
99 |
response = model.generate_content([full_prompt], generation_config={"temperature": temperature})
|
100 |
return response.parts[0].text if response and response.parts else "Error al generar contenido."
|