Spaces:
Runtime error
Runtime error
hedtorresca
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def validate_inputs(A, B, C, AB, AC, BC, ABC, U):
|
|
16 |
errors.append("El conjunto universal U es menor que la suma total de los conjuntos y sus intersecciones.")
|
17 |
return errors
|
18 |
|
19 |
-
def suggest_intersections(A, B, C, AB, AC, BC, U):
|
20 |
# Máximos valores permitidos para las intersecciones
|
21 |
max_AB = min(A, B, U - (A + B + C - A - B))
|
22 |
max_AC = min(A, C, U - (A + B + C - A - C))
|
@@ -104,7 +104,7 @@ def main(A, B, C, AB, AC, BC, ABC, U):
|
|
104 |
U = A + B + C
|
105 |
|
106 |
errors = validate_inputs(A, B, C, AB, AC, BC, ABC, U)
|
107 |
-
suggestions = suggest_intersections(A, B, C, AB, AC, BC, U)
|
108 |
if errors:
|
109 |
return None, {"error": "\n".join(errors), "sugerencias": suggestions}
|
110 |
|
|
|
16 |
errors.append("El conjunto universal U es menor que la suma total de los conjuntos y sus intersecciones.")
|
17 |
return errors
|
18 |
|
19 |
+
def suggest_intersections(A, B, C, AB, AC, BC, ABC, U):
|
20 |
# Máximos valores permitidos para las intersecciones
|
21 |
max_AB = min(A, B, U - (A + B + C - A - B))
|
22 |
max_AC = min(A, C, U - (A + B + C - A - C))
|
|
|
104 |
U = A + B + C
|
105 |
|
106 |
errors = validate_inputs(A, B, C, AB, AC, BC, ABC, U)
|
107 |
+
suggestions = suggest_intersections(A, B, C, AB, AC, BC, ABC, U)
|
108 |
if errors:
|
109 |
return None, {"error": "\n".join(errors), "sugerencias": suggestions}
|
110 |
|