JeCabrera commited on
Commit
7fe2b4b
·
verified ·
1 Parent(s): 9e5d6ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -1
app.py CHANGED
@@ -274,7 +274,29 @@ with col1:
274
  # 1. Idea Creativa al principio con altura de 70px
275
  creative_idea = st.text_area("Idea Creativa", placeholder="Ejemplo: Tu curso es como Netflix: ofrece contenido que engancha y soluciones que la gente realmente quiere ver", height=70)
276
 
277
- # 2. Mover el cargador de archivos justo después de Idea Creativa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  uploaded_file = st.file_uploader("📄 Archivo o imagen de referencia",
279
  type=['txt', 'pdf', 'docx', 'jpg', 'jpeg', 'png'])
280
 
@@ -283,10 +305,13 @@ with col1:
283
  image_parts = None
284
 
285
  if uploaded_file is not None:
 
286
  file_type = uploaded_file.name.split('.')[-1].lower()
287
 
288
  # Manejar archivos de texto
289
  if file_type in ['txt', 'pdf', 'docx']:
 
 
290
  if file_type == 'txt':
291
  try:
292
  file_content = uploaded_file.read().decode('utf-8')
 
274
  # 1. Idea Creativa al principio con altura de 70px
275
  creative_idea = st.text_area("Idea Creativa", placeholder="Ejemplo: Tu curso es como Netflix: ofrece contenido que engancha y soluciones que la gente realmente quiere ver", height=70)
276
 
277
+ # 2. Fórmula
278
+ selected_formula_key = st.selectbox(
279
+ "Selecciona una fórmula para tus emails",
280
+ options=list(email_formulas.email_formulas.keys()) # Updated reference
281
+ )
282
+
283
+ # 3. Ángulo
284
+ angle_keys = ["NINGUNO"] + sorted([key for key in angles.keys() if key != "NINGUNO"])
285
+ selected_angle = st.selectbox(
286
+ "Selecciona un ángulo para tus emails",
287
+ options=angle_keys
288
+ )
289
+
290
+ # 4. Emoción
291
+ emotion = st.selectbox(
292
+ "¿Qué emoción quieres evocar?",
293
+ options=["Curiosidad", "Miedo", "Esperanza", "Entusiasmo", "Confianza", "Urgencia"]
294
+ )
295
+
296
+ # 5. Creatividad (slider)
297
+ temperature = st.slider("Creatividad", min_value=0.0, max_value=2.0, value=1.0, step=0.1)
298
+
299
+ # 6. Lo demás (cargador de archivos)
300
  uploaded_file = st.file_uploader("📄 Archivo o imagen de referencia",
301
  type=['txt', 'pdf', 'docx', 'jpg', 'jpeg', 'png'])
302
 
 
305
  image_parts = None
306
 
307
  if uploaded_file is not None:
308
+ # El código para manejar archivos permanece igual
309
  file_type = uploaded_file.name.split('.')[-1].lower()
310
 
311
  # Manejar archivos de texto
312
  if file_type in ['txt', 'pdf', 'docx']:
313
+ # El código para manejar archivos de texto permanece igual
314
+ # ...
315
  if file_type == 'txt':
316
  try:
317
  file_content = uploaded_file.read().decode('utf-8')