A FastAPI web application for calculating Body Mass Index (BMI). Features a responsive HTML interface with static assets for styling and functionality.
- BMI Calculation: Calculate your BMI based on weight (kg) and height (m).
- Responsive Design: User-friendly interface with HTML, CSS, and JavaScript.
- Static Assets: Includes CSS for styling, JavaScript for dynamic functionality, and SVG logo.
-
Clone the Repository
git clone https://github.com/khabzox/BmiCalc.git cd BmiCalc
-
Start the FastAPI Server
uvicorn main:app --reload
-
Open Your Browser
Navigate to
http://127.0.0.1:8000
to view the application.
python-api/
│
├── BmiCalc.py # Module for BMI calculation logic
├── main.py # FastAPI application entry point
├── vercel.json # Vercel deployment configuration
├── requirements.txt # Python dependencies
└── templates/
├── assets/
│ ├── main.js # JavaScript for dynamic functionality
│ ├── style.css # CSS for styling
│ └── logo.svg # Logo image
└── index.html # Main HTML file
- Enter your weight in kilograms and height in meters into the form on the main page.
- Submit the form to calculate your BMI.
- View the result along with a health category based on your BMI value.
- Less than 18.5: Underweight
- 18.5 - 24.9: Healthy weight
- 25 - 29.9: Overweight
- 30 and above: Obesity
Note
BMI is a general guide. For a comprehensive health evaluation, consult with a healthcare professional.
Feel free to submit issues or pull requests to improve the project. Please follow the standard contribution guidelines and ensure that your changes are tested.