JeCabrera commited on
Commit
24eb247
·
verified ·
1 Parent(s): c1e9f48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -39
app.py CHANGED
@@ -54,33 +54,12 @@ def get_formula_instruction(formula, product):
54
  """
55
  elif formula == "If / Then + Authority":
56
  return f"""
57
- Write the opening paragraph using the 'If/Then' structure but add an authority figure or testimonial for added credibility. Start by presenting a problem or goal the reader might have, then explain how the product '{product}' can solve it, while mentioning an authority figure or expert opinion. The inclusion of authority figures or recognized references increases the impact of your message, making it more persuasive. For example:
58
 
59
  "If you want to learn how to write paragraphs that sell, then here are the techniques used by legendary copywriters like Gary Halbert and Eugene Schwartz to captivate millions."
60
 
61
  This use of authority validates your claim and makes the reader more likely to trust the solution you're offering.
62
  """
63
- elif formula == "Honesty":
64
- return f"""
65
- Write the opening paragraph using an honest approach, in first person way and focusing on transparency and vulnerability. Be clear that you're not pretending to have all the answers, but you do have a solution based on your genuine experience. The goal here is to create a real connection through authenticity. Honesty disarms skepticism and makes the reader feel heard, which is more impactful than over-promising or presenting yourself as an expert in every area.
66
-
67
- Why does this approach work?
68
- - It breaks barriers: Admitting what you aren't or don't have makes you more relatable and trustable.
69
- - It creates empathy: Readers resonate with your honesty and appreciate transparency.
70
- - It focuses attention: By being upfront about what you aren't, you spotlight what you can offer.
71
-
72
- Example (with honesty):
73
- "I'm not a personal trainer, nor do I have a degree in nutrition. In fact, the only thing I know about fitness is what I learned from struggling with my own weight. But that's why I want to show you how I lost 10 kilos without complicated diets or hours at the gym."
74
- "No soy chef profesional. Ni siquiera tengo un restaurante. De hecho, las recetas complicadas me aburren. Pero si amas cocinar cosas deliciosas en 20 minutos o menos, estás en el lugar correcto."
75
- "I’m not a financial advisor, and I don’t have a degree in economics. But after struggling with my own finances for years, I’ve learned a few simple tricks that saved me a lot on my grocery bills. And that’s exactly what I want to share with you."
76
- "I’m not a life coach with fancy credentials, and I don’t have a magic formula for changing your habits overnight. But I’ve struggled with my own bad habits, and I’ve found strategies that really worked for me. I want to show you how I did it and how you can too."
77
- Follow these steps to write with honesty:
78
- 1. Admit something you're not or don't have.
79
- Example: "I don't have a psychology PhD, but..."
80
- 2. Follow up with what you are or what you bring to the table.
81
- Example: "...I've spent 10 years studying how to improve my relationships, and I want to share what really works."
82
- 3. Balance honesty with value: Be genuine, but ensure your message still highlights what you can offer.
83
- """
84
  elif formula == "Sensationalist":
85
  return f"""
86
  Write the opening paragraph using a sensationalist approach. Introduce an unexpected or shocking fact, and link it to the product '{product}' as the solution. The goal is to create curiosity and urgency in the reader's mind.
@@ -105,22 +84,7 @@ def get_formula_instruction(formula, product):
105
 
106
  The question makes the reader pause and consider the information they are being offered, creating an interactive and engaging experience.
107
  """
108
- elif formula == "Micro Openings":
109
- return f"""
110
- Write the opening paragraph using a very short, impactful sentence. Create a strong hook that grabs the reader's attention immediately. For example, 'What if I told you that you could achieve X with just one simple tool?' Then, introduce the product '{product}' as the key to solving the issue.
111
-
112
- Context:
113
- Micro openings work by delivering a quick, powerful message that hooks the reader. These openings often feel personal and conversational, sparking curiosity with just a few words.
114
-
115
- Example:
116
- "Yo no creía que fuera posible.
117
- Ganar dinero desde casa.
118
- Sin salir.
119
- Sin jefes.
120
- Pero me equivoqué."
121
-
122
- The brevity and simplicity of micro openings make them easy to absorb, yet powerful enough to captivate the reader's attention.
123
- """
124
  return ""
125
 
126
  # Generar respuesta del modelo
@@ -163,7 +127,7 @@ with col1:
163
  product = st.text_input("¿Qué producto tienes en mente?")
164
 
165
  with st.expander("Personaliza tu párrafo de apertura"):
166
- formula = st.selectbox("Selecciona una fórmula de copywriting", ["If/Then", "If / Then + Authority", "Honesty", "Sensationalist", "Ask a Question", "Micro Openings"])
167
  length = st.slider("Número de palabras", min_value=10, max_value=50, value=25)
168
  mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Persuasivo"])
169
  emotionality = st.selectbox("Emocionalidad del texto", ["Triste", "Feliz", "Romántico", "Sorpresa", "Esperanza", "Ira", "Confianza"])
 
54
  """
55
  elif formula == "If / Then + Authority":
56
  return f"""
57
+ Write the opening paragraph using the 'If/Then' structure but with an authority figure or testimonial for added credibility. Start by presenting a problem or goal the reader might have, then explain how the product '{product}' can solve it, while mentioning an authority figure or expert opinion. The inclusion of authority figures or recognized references increases the impact of your message, making it more persuasive. For example:
58
 
59
  "If you want to learn how to write paragraphs that sell, then here are the techniques used by legendary copywriters like Gary Halbert and Eugene Schwartz to captivate millions."
60
 
61
  This use of authority validates your claim and makes the reader more likely to trust the solution you're offering.
62
  """
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  elif formula == "Sensationalist":
64
  return f"""
65
  Write the opening paragraph using a sensationalist approach. Introduce an unexpected or shocking fact, and link it to the product '{product}' as the solution. The goal is to create curiosity and urgency in the reader's mind.
 
84
 
85
  The question makes the reader pause and consider the information they are being offered, creating an interactive and engaging experience.
86
  """
87
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  return ""
89
 
90
  # Generar respuesta del modelo
 
127
  product = st.text_input("¿Qué producto tienes en mente?")
128
 
129
  with st.expander("Personaliza tu párrafo de apertura"):
130
+ formula = st.selectbox("Selecciona una fórmula de copywriting", ["If/Then", "If / Then + Authority", "Sensationalist", "Ask a Question"])
131
  length = st.slider("Número de palabras", min_value=10, max_value=50, value=25)
132
  mood = st.selectbox("Tono de voz", ["Conversacional", "Formal", "Persuasivo"])
133
  emotionality = st.selectbox("Emocionalidad del texto", ["Triste", "Feliz", "Romántico", "Sorpresa", "Esperanza", "Ira", "Confianza"])