Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -837,7 +837,13 @@ def round_floats(obj: Union[float, Dict, List], ndigits: int = 3) -> Union[float
|
|
837 |
elif isinstance(obj, (list, tuple)):
|
838 |
return [round_floats(x, ndigits) for x in obj]
|
839 |
return obj
|
840 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
841 |
@app.route('/calculation', methods=['POST'])
|
842 |
def handle_calculation():
|
843 |
try:
|
|
|
837 |
elif isinstance(obj, (list, tuple)):
|
838 |
return [round_floats(x, ndigits) for x in obj]
|
839 |
return obj
|
840 |
+
if __name__ == "__main__":
|
841 |
+
try:
|
842 |
+
calculator = NutrientCalculator(volume_liters=VOLUME_LITERS)
|
843 |
+
calculator.calculate()
|
844 |
+
calculator.print_report()
|
845 |
+
except Exception as e:
|
846 |
+
print(f"Критическая ошибка: {str(e)}")
|
847 |
@app.route('/calculation', methods=['POST'])
|
848 |
def handle_calculation():
|
849 |
try:
|