{"id":21176357,"url":"https://github.com/rikcav/api-ml-model","last_synced_at":"2026-05-19T00:39:54.655Z","repository":{"id":221917231,"uuid":"755775898","full_name":"rikcav/api-ml-model","owner":"rikcav","description":"This project implements a simple Flask API for predicting BMI (Body Mass Index) categories based on input data. The API uses a RandomForestClassifier model trained on a dataset containing BMI information.","archived":false,"fork":false,"pushed_at":"2024-03-20T11:07:14.000Z","size":861,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T11:30:33.828Z","etag":null,"topics":["api","bmi","flask","ml","random-forest-classifier"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rikcav.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-11T02:28:16.000Z","updated_at":"2024-03-20T11:03:50.000Z","dependencies_parsed_at":"2024-02-11T03:25:14.421Z","dependency_job_id":"611adff0-a26b-4433-ba65-a55abe9409db","html_url":"https://github.com/rikcav/api-ml-model","commit_stats":null,"previous_names":["rikcav/api-ml-model"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikcav%2Fapi-ml-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikcav%2Fapi-ml-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikcav%2Fapi-ml-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikcav%2Fapi-ml-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikcav","download_url":"https://codeload.github.com/rikcav/api-ml-model/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243624092,"owners_count":20321029,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bmi","flask","ml","random-forest-classifier"],"created_at":"2024-11-20T17:01:30.528Z","updated_at":"2026-05-19T00:39:54.619Z","avatar_url":"https://github.com/rikcav.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BMI Prediction API\n\nThis project implements a simple Flask API for predicting BMI (Body Mass Index) categories based on input data. The API uses a RandomForestClassifier model trained on a dataset containing BMI information.\n\n## Files in the Project\n\n- **app.py**: Contains the Flask API implementation with two endpoints, one for testing the API (`/`) and another for getting the BMI prediction output (`/getPredictionOutput`).\n- **model.py**: Contains the code for loading the dataset, preprocessing the data, training the RandomForestClassifier model using Grid Search for hyperparameter tuning, and saving the best model to a file.\n- **prediction.py**: Contains a function for loading the trained model and making predictions based on input data.\n\n## Usage\n\n1. Clone this repository to your local machine.\n2. Install the required dependencies using `pip install -r requirements.txt`.\n3. Run the Flask API using `python app.py`. The API will be available at `http://localhost:5000`.\n4. Use a tool like Postman or curl to test the API endpoints. You can send a POST request to `/getPredictionOutput` with JSON data containing the features required for prediction.\n\n## Example Request\n\n```json\n{\n    \"Gender\": 1,\n    \"Height\": 170,\n    \"Weight\": 70,\n    \"Age\": 25\n}\n```\n\n## Example Response\n\n```json\n{\n    \"predict\": \"Normal\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikcav%2Fapi-ml-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikcav%2Fapi-ml-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikcav%2Fapi-ml-model/lists"}