JeCabrera commited on
Commit
6d8e558
·
verified ·
1 Parent(s): 94eade6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +74 -31
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
- You are a creative storyteller. Write THREE different {mood} stories in Spanish about "{input_prompt}" using everyday words and natural conversation.
25
- Each story should use exactly {length} words.
26
-
27
- Target Audience: {target_audience}
28
- Call to Action: {cta_type}
29
- Story Formula: {formula_type}
30
-
31
- {formula["description"]}
32
-
33
- Keep in mind:
34
- - Write for {target_audience}
35
- - Use simple, clear language
36
- - Tell the story in short paragraphs
37
- - The CTA must be conversational and focus on benefits:
38
- * Instead of: "Inscríbete al curso de marketing"
39
- * Use: "¿Quieres aprender a conseguir más clientes? Acompáñanos este jueves..."
40
- * Instead of: "Reserva tu consulta"
41
- * Use: "Da el primer paso hacia tu transformación aquí..."
42
-
43
- CRITICAL INSTRUCTIONS:
44
- - Output ONLY the story text
45
- - DO NOT include any labels like (Problem), (Solution), etc.
46
- - DO NOT include any structural markers or formula explanations
47
- - Write as a continuous narrative with natural paragraph breaks
48
- - The story should flow naturally between sections without any visible structure markers
49
- - Make the CTA feel like a natural part of the conversation, focusing on what the reader will gain
50
- - Avoid promotional language in the CTA
51
- - DO NOT explain or mention the formula parts in the text
52
- - Separate each story with "---"
53
-
54
- Format: Three clean story texts with natural paragraphs, separated by "---", no labels, no explanations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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."