JeCabrera commited on
Commit
3b4f460
verified
1 Parent(s): 9461e8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -241,21 +241,21 @@ with col2:
241
  # Validar componentes de la f贸rmula Contraste Revelador
242
  # Before line 244, make sure situacion is defined
243
  if formula_type == "Contraste Revelador":
244
- # Initialize variables with default empty values if they don't exist
245
- situacion = st.session_state.get('situacion', '')
246
- solucion = st.session_state.get('solucion', '')
247
- resultado = st.session_state.get('resultado', '')
248
-
249
- # Now perform your validation
250
- if situacion and not any(keyword in situacion for keyword in ["problema", "frustraci贸n", "dificultad", "obst谩culo"]):
251
- st.warning("La situaci贸n debe describir claramente un problema o frustraci贸n del p煤blico objetivo")
252
-
253
- # Continue with other validations
254
- if solucion and not solucion.isupper():
255
- st.warning("La soluci贸n transformadora debe estar completamente en MAY脷SCULAS")
256
-
257
- if resultado and not any(char.isdigit() for char in resultado):
258
- st.warning("El resultado emocional debe incluir alg煤n n煤mero espec铆fico como prueba social")
259
 
260
  # Add instruction for generating bonuses that complement the offer
261
  instruction += create_bonus_instruction(
 
241
  # Validar componentes de la f贸rmula Contraste Revelador
242
  # Before line 244, make sure situacion is defined
243
  if formula_type == "Contraste Revelador":
244
+ # Initialize variables with default empty values if they don't exist
245
+ situacion = st.session_state.get('situacion', '')
246
+ solucion = st.session_state.get('solucion', '')
247
+ resultado = st.session_state.get('resultado', '')
248
+
249
+ # Now perform your validation
250
+ if situacion and not any(keyword in situacion for keyword in ["problema", "frustraci贸n", "dificultad", "obst谩culo"]):
251
+ st.warning("La situaci贸n debe describir claramente un problema o frustraci贸n del p煤blico objetivo")
252
+
253
+ # Continue with other validations
254
+ if solucion and not solucion.isupper():
255
+ st.warning("La soluci贸n transformadora debe estar completamente en MAY脷SCULAS")
256
+
257
+ if resultado and not any(char.isdigit() for char in resultado):
258
+ st.warning("El resultado emocional debe incluir alg煤n n煤mero espec铆fico como prueba social")
259
 
260
  # Add instruction for generating bonuses that complement the offer
261
  instruction += create_bonus_instruction(