{"id":21089610,"url":"https://github.com/coolmunzi/webapp_mlops","last_synced_at":"2025-09-08T18:36:56.943Z","repository":{"id":202322870,"uuid":"349734047","full_name":"coolmunzi/webapp_mlops","owner":"coolmunzi","description":"This is a simple webapp for wine quality prediction and involves MLOPs including DVC for model and data tracking and Github actions for CI-Cd workflows. The app is deployed on Heroku.","archived":false,"fork":false,"pushed_at":"2021-03-24T17:04:43.000Z","size":155,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T06:13:49.790Z","etag":null,"topics":["ci-cd","ci-cd-pipeline","devops","dvc","elasticnet","github-actions","heroku","machine-learning","machine-learning-application","mlops","mlops-environment","regression","webapp"],"latest_commit_sha":null,"homepage":"https://wine-quality-analysis.herokuapp.com/","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/coolmunzi.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}},"created_at":"2021-03-20T13:34:02.000Z","updated_at":"2023-05-20T05:44:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa0c8bd7-a42c-4249-924a-0bd459db7af8","html_url":"https://github.com/coolmunzi/webapp_mlops","commit_stats":null,"previous_names":["coolmunzi/webapp_mlops"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coolmunzi/webapp_mlops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolmunzi%2Fwebapp_mlops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolmunzi%2Fwebapp_mlops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolmunzi%2Fwebapp_mlops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolmunzi%2Fwebapp_mlops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coolmunzi","download_url":"https://codeload.github.com/coolmunzi/webapp_mlops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coolmunzi%2Fwebapp_mlops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229375,"owners_count":25245188,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ci-cd","ci-cd-pipeline","devops","dvc","elasticnet","github-actions","heroku","machine-learning","machine-learning-application","mlops","mlops-environment","regression","webapp"],"created_at":"2024-11-19T21:29:53.408Z","updated_at":"2025-09-08T18:36:56.918Z","avatar_url":"https://github.com/coolmunzi.png","language":"Python","readme":"create env \n\n```bash\nconda create -n wineq python=3.7 -y\n```\n\nactivate env\n```bash\nconda activate wineq\n```\n\ncreated a req file\n\ninstall the req\n```bash\npip install -r requirements.txt\n```\ndownload the data from \n\nhttps://drive.google.com/drive/folders/18zqQiCJVgF7uzXgfbIJ-04zgz1ItNfF5?usp=sharing\n\n```bash\ngit init\n```\n```bash\ndvc init \n```\n```bash\ndvc add data_given/winequality.csv\n```\n```bash\ngit add .\n```\n```bash\ngit commit -m \"first commit\"\n```\n\noneliner updates  for readme\n\n```bash\ngit add . \u0026\u0026 git commit -m \"update Readme.md\"\n```\n```bash\ngit remote add origin https://github.com/coolmunzi/webapp_mlops.git\ngit branch -M main\ngit push origin main\n```\nAdd/ Update stages:\n1. **get_data.py**: Involves data capture from csv files and create dataframe \n2. **load_data.py**: Load the captured data, process it and store the processed data as csv file\n3. **split_Data.py**: Splits the total dataset into training and testing chunks\n4. **train_and_evaluate.py**: Train the model and evaluate the model performance \n\nUpdate stages in dvc.yaml\n\nAdd all stages to dvc for tracking\n```bash\ndvc repro\n```\n\nTo see the model evaluation metrics from dvc\n```bash\ndvc metrics show\n```\n\nIf you change the hyper parameters and later on would like to compare the hyper-parameters os all experiments\n```bash\ndvc metrics diff\n```\n\nAdd/update testing files: __init__.py, conftest.py, schema_in.json and test_config.py inside tests directory\nNOTE: Testing can be done using pytest (via pytest -v) or using tox.\n\nCreate schema_in.json indicating min and max values for all the columns using following command:\n```bash \nimport pandas as pd\ndf = pd.read_csv('data_given/winequality.csv')\noverview = df.describe()\noverview.loc[ [\"min\", \"max\"] ].to_json(\"schema_in.json\")\n```\nTo run mlflow server \n```bash\nmlflow server --backend-store-uri sqlite:///mlflow.db --default-artifact-root ./artifacts --host 0.0.0.0 -p 1234\n```\n\nTo run tests using tox, add/update tox.ini file.\n\ntox command to run tests:\n```bash\ntox\n```\nFor rebuilding the testing environment when there is change in requirements -\n```bash\ntox -r \n```\nCreate setup.py to make package from src. After adding/updating setup.py, execute following command to create src package.\n```bash\npip install -e .\n```\n\nTo build wheel file for src package (Do this if you really need wheel file) \n```bash\npython setup.py sdist bdist_wheel\n```\n\nFor CI-CD workflow, add/update ci-cd.yaml file under .github/workflows which manages github actions\n\nCreate a new webapp in Heroku and connect it with your github. Choose Automatic Deploy in Heroku and enable _\"Wait for CI to pass before deploy\"_. \nCreate HEROKU_APP_NAME \u0026 HEROKU_API_TOKEN secrets in the github. (NOTE: generate heroku api tokens from applications -\u003e create authorization -\u003e define api token).\n\nThis app is deployed on https://wine-quality-analysis.herokuapp.com/ with CI-CD pipeline.\n\nFollowing image depicts how the deployed app looks like.\n![alt text](Demo.jpg)\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolmunzi%2Fwebapp_mlops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoolmunzi%2Fwebapp_mlops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoolmunzi%2Fwebapp_mlops/lists"}