Spaces:
Runtime error
Runtime error
Download utils.py from aimed/antropometry_for_pediatrics: direct link, hf CLI and curl.
- Browser
- Download file 933 Bytes
-
https://huggingface.co/spaces/aimed/antropometry_for_pediatrics/resolve/main/utils.py
- Command line
-
hf download hf://spaces/aimed/antropometry_for_pediatrics/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/aimed/antropometry_for_pediatrics/resolve/main/utils.py
933 Bytes
| import pandas as pd | |
| from pygrowup import Calculator | |
| #from pygrowup import helpers | |
| def calc(weight,height,age,gender): | |
| if age <= 24: | |
| calculator = Calculator(adjust_height_data=False, | |
| adjust_weight_scores=False, | |
| include_cdc=False, | |
| logger_name='pygrowup', | |
| log_level='INFO') | |
| wfa = calculator.wfa(weight,age,gender) | |
| lhfa = calculator.lhfa(height,age,gender) | |
| if age > 24: | |
| calculator = Calculator(adjust_height_data=False, | |
| adjust_weight_scores=False, | |
| include_cdc=True, | |
| logger_name='pygrowup', | |
| log_level='INFO') | |
| wfa = calculator.wfa(weight,age,gender) | |
| lhfa = calculator.lhfa(height,age,gender) | |
| return wfa,lhfa | |