{"id":20708112,"url":"https://github.com/sumitst05/heart-disease-pred","last_synced_at":"2026-04-21T15:03:10.910Z","repository":{"id":254735204,"uuid":"847393479","full_name":"sumitst05/heart-disease-pred","owner":"sumitst05","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-26T15:40:05.000Z","size":426,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T20:34:56.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://heart-disease-pred.koyeb.app/docs","language":"Jupyter Notebook","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/sumitst05.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,"publiccode":null,"codemeta":null}},"created_at":"2024-08-25T17:40:45.000Z","updated_at":"2024-08-26T15:40:08.000Z","dependencies_parsed_at":"2024-11-17T01:29:20.740Z","dependency_job_id":"09821842-55f7-40f9-93e7-6edd4cc5765a","html_url":"https://github.com/sumitst05/heart-disease-pred","commit_stats":null,"previous_names":["sumitst05/heart-disease-pred"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumitst05%2Fheart-disease-pred","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumitst05%2Fheart-disease-pred/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumitst05%2Fheart-disease-pred/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sumitst05%2Fheart-disease-pred/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sumitst05","download_url":"https://codeload.github.com/sumitst05/heart-disease-pred/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242976441,"owners_count":20215605,"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":[],"created_at":"2024-11-17T01:29:18.022Z","updated_at":"2026-04-21T15:03:10.731Z","avatar_url":"https://github.com/sumitst05.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heart Disease Prediction API\n\nThis project is just me trying to get my hands dirty with a little bit of ML magic.\n\n## Project Structure\n\n- `app/`: Has got the FastAPI application code.\n- `src/models/`: Has the pre-trained model file `heart_model.pkl`.\n- `src/data/`: Dataset used for model training ([heart.csv](https://www.kaggle.com/datasets/johnsmith88/heart-disease-dataset/data))\n- `notebooks/`: Contains Jupyter Notebooks used for developing and testing the model.\n- `requirements.txt`: Lists the Python dependencies for the project.\n\n## How to Use\n\n### Starting the FastAPI Application\n\n1. **Install Dependencies**: Make sure you have all required packages installed. You can install them using:\n   ```bash\n   pip install -r requirements.txt\n\n2. **Run the FastAPI Application: Start the server with**:\n    ```bash\n    uvicorn app.main:app --reload\n    ```\n    \u003e The API will be accessible at http://127.0.0.1:8000.\n\n\n### Making Predictions\n\nTo make a prediction, send a POST request to the /predict endpoint with the following JSON body:\n\n_Example:_\n\n```json\n{\n  \"age\": 34,\n  \"sex\": 0,\n  \"cp\": 1,\n  \"trestbps\": 118,\n  \"chol\": 210,\n  \"fbs\": 0,\n  \"restecg\": 1,\n  \"thalach\": 192,\n  \"exang\": 0,\n  \"oldpeak\": 0.7,\n  \"slope\": 2,\n  \"ca\": 0,\n  \"thal\": 1\n}\n```\n\n**Parameters**:\n\n- age: Age of the patient (integer).\n\n- sex: Sex of the patient (0 = female, 1 = male).\n\n- cp: Chest pain type (0 to 3).\n\n- trestbps: Resting blood pressure (integer).\n\n- chol: Serum cholesterol level (integer).\n\n- fbs: Fasting blood sugar \u003e 120 mg/dl (0 = false, 1 = true).\n\n- restecg: Resting electrocardiographic results (0 to 2).\n\n- thalach: Maximum heart rate achieved (integer).\n\n- exang: Exercise induced angina (0 = no, 1 = yes).\n\n- oldpeak: Depression induced by exercise relative to rest (float).\n\n- slope: Slope of the peak exercise ST segment (0 to 2).\n\n- ca: Number of major vessels colored by fluoroscopy (0 to 3).\n\n- thal: Thalassemia (1 = normal, 2 = fixed defect, 3 = reversible defect).\n\n\n## Model File\n\nThe pre-trained model file heart_model.pkl is included in the src/models/ directory. This file was created by training the model on the dataset provided in data/heart.csv.\n\n## Notbook\n\nYou can find the colab notebook that was used in /notebooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumitst05%2Fheart-disease-pred","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumitst05%2Fheart-disease-pred","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumitst05%2Fheart-disease-pred/lists"}