{"id":129,"date":"2021-07-16T16:00:40","date_gmt":"2021-07-16T16:00:40","guid":{"rendered":"https:\/\/felixaugenstein.com\/blog\/?p=129"},"modified":"2021-07-16T16:00:40","modified_gmt":"2021-07-16T16:00:40","slug":"deploy-a-local-python-app-to-test-your-machine-learning-models-for-instance-to-predict-customer-churn","status":"publish","type":"post","link":"https:\/\/felixaugenstein.com\/blog\/deploy-a-local-python-app-to-test-your-machine-learning-models-for-instance-to-predict-customer-churn\/","title":{"rendered":"Deploy a local Python App to test your machine learning models for instance to predict customer churn"},"content":{"rendered":"\n<p>In this hands-on tutorial you will deploy a local Python app to test your model.<\/p>\n\n\n\n<p>If you don\u2019t have one already, please Sign up for an <a href=\"https:\/\/cloud.ibm.com\/registration\" target=\"_blank\" rel=\"noreferrer noopener\">IBM Cloud account<\/a>.<\/p>\n\n\n\n<p>This tutorial consists of 6 parts, you can start with part I or any other part, however, the necessary environment is set up in part I.<br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial\" target=\"_blank\">Part I \u2013 data visualization, preparation, and transformation<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-ii\" target=\"_blank\">Part II \u2013 build and evaluate machine learning models by using AutoAI<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-iii\" target=\"_blank\">Part III \u2013 graphically build and evaluate machine learning models by using SPSS Modeler flow<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-iv\" target=\"_blank\">Part IV \u2013 set up and run Jupyter Notebooks to develop a machine learning model<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-v\" target=\"_blank\">Part V \u2013 deploy a local Python app to test your model<\/a><br><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-vi\" target=\"_blank\">Part VI \u2013 monitor your model with OpenScale<\/a><\/p>\n\n\n\n<p>Let&#8217;s imagine we have developed a machine learning model &#8211; using AutoAI, SPSS Modeler or a Jupyter Notebook &#8211; and now we want to deploy it and make it available to users in a certain form. For the example of customer churn, this could be a UI in which marketing employees can enter data and start a prediction. The data is then sent directly via REST API to a corresponding endpoint and the prediction comes back as a result, which we can then display in the UI.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-1024x564.png\" alt=\"\" class=\"wp-image-131\" srcset=\"https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-1024x564.png 1024w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-300x165.png 300w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-768x423.png 768w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-1536x845.png 1536w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-830x457.png 830w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-230x127.png 230w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-350x193.png 350w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1-480x264.png 480w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-1.png 1695w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"609\" src=\"https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-1024x609.png\" alt=\"\" class=\"wp-image-132\" srcset=\"https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-1024x609.png 1024w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-300x178.png 300w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-768x457.png 768w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-1536x913.png 1536w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-830x494.png 830w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-230x137.png 230w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-350x208.png 350w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2-480x285.png 480w, https:\/\/felixaugenstein.com\/blog\/wp-content\/uploads\/2021\/07\/python-ui-2.png 1643w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Just go to this <a href=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-v\" data-type=\"URL\" data-id=\"https:\/\/github.com\/FelixAugenstein\/cloud-pak-for-data-tutorial-part-v\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub Repository<\/a>, follow the instructions to set up the local Python app and hit the prediction button.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this hands-on tutorial you will deploy a local Python app to test your model. If you don\u2019t have one already, please Sign up for an IBM Cloud account. This tutorial consists of 6 parts, you can start with part I or any other part, however, the necessary environment is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":130,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,4,27,19,20],"tags":[],"class_list":["post-129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-application","category-ibm-watson","category-python","category-rest-apis","category-watson-studio"],"_links":{"self":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/comments?post=129"}],"version-history":[{"count":1,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/posts\/129\/revisions\/133"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/media\/130"}],"wp:attachment":[{"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/media?parent=129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/categories?post=129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/felixaugenstein.com\/blog\/wp-json\/wp\/v2\/tags?post=129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}