Advanced BMI Calculator
Overview A Python-based BMI calculator with a Gradio interface. It calculates BMI, provides health advice, and suggests an ideal weight. Users can input height in meters or inches.
Features
- BMI calculation.
- Health advice based on BMI category.
- Ideal weight suggestion.
- Input height in meters or inches.
- Interactive Gradio interface.
Prerequisites
- Python (>= 3.6)
- Gradio library: Install with
pip install gradio
How to Run
- Save the script as
bm.py
. - Run the script:
python bm.py
- Open the URL provided in the terminal.
Usage
- Enter weight (kg) and height (meters or inches).
- Select age and gender.
- Click "Submit" to view BMI, category, health advice, and ideal weight.
Example Input:
- Weight: 70 kg
- Height: 1.75 meters
- Age: 25 years
- Gender: Male
Output:
BMI: 22.86
Status: Normal weight
Advice: Maintain a balanced diet and exercise.
Ideal Weight: 69.25 kg
Enjoy using the BMI calculator!