Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 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(
|