JeCabrera commited on
Commit
ab08c4d
·
verified ·
1 Parent(s): 69bce5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -5
app.py CHANGED
@@ -164,6 +164,7 @@ st.sidebar.markdown(manual_content)
164
  col1, col2 = st.columns([1, 1])
165
 
166
  # Columna izquierda para inputs
 
167
  with col1:
168
  product_service = st.text_area(
169
  "¿Cuál es tu producto o servicio?",
@@ -171,7 +172,7 @@ with col1:
171
  )
172
 
173
  main_benefit = st.text_area(
174
- "¿Cuál es el beneficio principal?",
175
  placeholder="Ejemplo: Aprender copywriting a través de transformaciones reales de textos..."
176
  )
177
 
@@ -184,10 +185,30 @@ with col1:
184
  generate_button = st.button("Generar Ideas Creativas")
185
 
186
  with st.expander("Opciones avanzadas"):
187
- tone_of_voice = st.text_area(
188
- "Tono de voz de la marca (opcional)",
189
- placeholder="Ejemplo: Cercano, profesional, con toques de humor..."
190
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
 
192
  # Añadir cargador de archivos
193
  uploaded_file = st.file_uploader("📄 Archivo o imagen de referencia",
 
164
  col1, col2 = st.columns([1, 1])
165
 
166
  # Columna izquierda para inputs
167
+ # In the app.py file, update the main_benefit field label and create an accordion for tone options
168
  with col1:
169
  product_service = st.text_area(
170
  "¿Cuál es tu producto o servicio?",
 
172
  )
173
 
174
  main_benefit = st.text_area(
175
+ "¿Cuál es tu Oferta Dorada/PUV?",
176
  placeholder="Ejemplo: Aprender copywriting a través de transformaciones reales de textos..."
177
  )
178
 
 
185
  generate_button = st.button("Generar Ideas Creativas")
186
 
187
  with st.expander("Opciones avanzadas"):
188
+ # Replace text area with accordion for tone selection
189
+ st.write("Tono de voz de la marca (opcional)")
190
+ tone_options = {
191
+ "Profesional": "A formal and expert tone that conveys authority and knowledge.",
192
+ "Serio": "A direct and sober tone, focused on facts and results.",
193
+ "Divertido": "A cheerful and positive tone that connects in a friendly way.",
194
+ "Sarcástico": "A witty tone with a touch of irony that surprises.",
195
+ "Humorístico": "A tone that uses humor to connect and entertain."
196
+ }
197
+
198
+ selected_tone = None
199
+ for tone, description in tone_options.items():
200
+ with st.expander(tone):
201
+ st.write(description)
202
+ if st.button(f"Seleccionar tono {tone}", key=f"tone_{tone}"):
203
+ selected_tone = tone
204
+
205
+ # Store the selected tone
206
+ if selected_tone:
207
+ st.session_state.selected_tone = selected_tone
208
+ st.success(f"Tono seleccionado: {selected_tone}")
209
+
210
+ # Use the stored tone or empty string
211
+ tone_of_voice = st.session_state.get("selected_tone", "")
212
 
213
  # Añadir cargador de archivos
214
  uploaded_file = st.file_uploader("📄 Archivo o imagen de referencia",