{"id":10498,"date":"2020-10-19T10:11:35","date_gmt":"2020-10-19T10:11:35","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/?p=10498"},"modified":"2023-10-20T10:26:59","modified_gmt":"2023-10-20T10:26:59","slug":"how-build-data-science-web-app-python-part-3","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/how-build-data-science-web-app-python-part-3\/","title":{"rendered":"How to Build a Data Science Web App in Python (Penguin Classifier) &#8211; Part 3"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10498\" class=\"elementor elementor-10498\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-783b0d25 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"783b0d25\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-beeb312\" data-id=\"beeb312\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2134ad0 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2134ad0\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e257848\" data-id=\"e257848\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b8bcfdc elementor-widget elementor-widget-heading\" data-id=\"b8bcfdc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Part 3: ML-Powered Web App in a Little Over 100 Lines of Code<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-47c0632 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"47c0632\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-770c0e6\" data-id=\"770c0e6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c0adf79 elementor-widget elementor-widget-text-editor\" data-id=\"c0adf79\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This is <strong>Part 3 <\/strong>and I will be showing you how to build a machine learning powered data science web app in Python using the Streamlit library in a little over 100 lines of code.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-24b2a99 elementor-widget elementor-widget-text-editor\" data-id=\"24b2a99\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The web app that we will be building today is the Penguins Classifier. The demo of this Penguins Classifier web app that we are building is available at http:\/\/dp-penguins.herokuapp.com\/.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-85d0462 elementor-widget elementor-widget-text-editor\" data-id=\"85d0462\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Previously, in Part 1 of this Streamlit tutorial series, I have shown you how to build your first data science web app in Python that is able to fetch stock price data from Yahoo! Finance followed by displaying a simple line chart. In Part 2, I have shown you how to build a machine learning web app using the Iris dataset.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d0b98a5 elementor-widget elementor-widget-text-editor\" data-id=\"d0b98a5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As also explained in previous articles of this &lt;em&gt;Streamlit Tutorial Series&lt;\/em&gt;, model deployment is an essential and final component of the data science life cycle that helps to bring the power of data-driven insights to the hands of end users whether it be business stakeholders, managers or customers.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-acacf8b elementor-widget elementor-widget-image\" data-id=\"acacf8b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"191\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-1024x191.jpeg\" class=\"attachment-large size-large wp-image-33589\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-1024x191.jpeg 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-300x56.jpeg 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-768x143.jpeg 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-1536x286.jpeg 1536w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-610x114.jpeg 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-750x140.jpeg 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl-1140x212.jpeg 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_uEj0hxec9K0STjIl.jpeg 1964w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b7bd239 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b7bd239\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7b40ea6\" data-id=\"7b40ea6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-28f2889 elementor-widget elementor-widget-text-editor\" data-id=\"28f2889\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThis article is based on a video that I had made on the same topic on the\u00a0<a href=\"https:\/\/www.youtube.com\/dataprofessor?sub_confirmation=1\" target=\"_blank\" rel=\"noreferrer noopener\">Data Professor YouTube channel<\/a>\u00a0(<a href=\"https:\/\/youtu.be\/Eai1jaZrRDs\" target=\"_blank\" rel=\"noreferrer noopener\">How to Build a Penguin Classification Web App in Python<\/a>) in which you can watch it alongside reading this article.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-fd3eeb2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"fd3eeb2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-898bb70\" data-id=\"898bb70\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-27f6265 elementor-widget elementor-widget-video\" data-id=\"27f6265\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;youtube_url&quot;:&quot;https:\\\/\\\/www.youtube.com\\\/watch?v=Eai1jaZrRDs&amp;feature=youtu.be&quot;,&quot;video_type&quot;:&quot;youtube&quot;,&quot;controls&quot;:&quot;yes&quot;}\" data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ec64f10 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ec64f10\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a118159\" data-id=\"a118159\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0d4081c elementor-widget elementor-widget-heading\" data-id=\"0d4081c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Overview of the Penguin Classification Web App<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-0f2b76e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0f2b76e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6e803d2\" data-id=\"6e803d2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-08b3376 elementor-widget elementor-widget-text-editor\" data-id=\"08b3376\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this article, we will be building a <em>Penguin Classifier<\/em> web app for predicting the class label of Penguin species as being Adelie, Chinstrap or Gentoo as a function of 4 quantitative variables and 2 qualitative variables.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ebdfb2e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ebdfb2e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-13c0bec\" data-id=\"13c0bec\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-91f8cda elementor-widget elementor-widget-image\" data-id=\"91f8cda\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"1024\" height=\"611\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-1024x611.png\" class=\"attachment-large size-large wp-image-33590\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-1024x611.png 1024w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-300x179.png 300w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-768x458.png 768w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-1536x917.png 1536w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-610x364.png 610w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-750x448.png 750w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8-1140x680.png 1140w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/0_9x6ViEBsTJIv2go8.png 1620w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8fa79ba elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8fa79ba\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-cd32269\" data-id=\"cd32269\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0fb053b elementor-widget elementor-widget-heading\" data-id=\"0fb053b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Penguins dataset<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9ed9c14 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9ed9c14\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a5ed48f\" data-id=\"a5ed48f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fac4dcc elementor-widget elementor-widget-text-editor\" data-id=\"fac4dcc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThe data used in this machine learning-powered web app is called the\u00a0<a href=\"https:\/\/github.com\/allisonhorst\/palmerpenguins\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Palmer Penguins<\/em>\u00a0dataset<\/a>, which is released as an R package by Allison Horst. Particularly, the data is derived from the published work of Dr. Kristen Gorman and colleagues entitled\u00a0<a href=\"https:\/\/doi.org\/10.1371\/journal.pone.0090081\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Ecological Sexual Dimorphism and Environmental Variability within a Community of Antarctic Penguins (Genus Pygoscelis)<\/em><\/a>.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7078540 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7078540\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3f9f6af\" data-id=\"3f9f6af\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-65c41e4 elementor-widget elementor-widget-text-editor\" data-id=\"65c41e4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThe data set is comprised of\u00a0<strong>4 quantitative variables<\/strong>:\n\n\n<ul class=\"wp-block-list\">\n<li>Bill length (mm)<\/li>\n<li>Bill depth (mm)<\/li>\n<li>Flipper length (mm)<\/li>\n<li>Body mass (g)<\/li>\n<\/ul>\n\nAnd\u00a0<strong>2 qualitative variables<\/strong>:\n\n<ul class=\"wp-block-list\">\n<li>Sex (male\/female)<\/li>\n<li>Island (Biscoe\/Dream\/Torgersen)<\/li>\n<\/ul>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-795d364 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"795d364\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-112bd29\" data-id=\"112bd29\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c0dda4f elementor-widget elementor-widget-text-editor\" data-id=\"c0dda4f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tLet\u2019s take a look at the Penguins dataset (shown below is a truncated version that shows only the first 3 row entries for each of the 3 Penguin species):https:\/\/towardsdatascience.com\/media\/8ec412d3767aca2b2c5bffd0c8f05422\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d78824f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d78824f\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e2c9dee\" data-id=\"e2c9dee\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8122970 elementor-widget elementor-widget-text-editor\" data-id=\"8122970\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<code><em>(Note: The full version of the\u00a0<\/em><a href=\"https:\/\/github.com\/dataprofessor\/data\/blob\/master\/penguins_cleaned.csv\" target=\"_blank\" rel=\"noreferrer noopener\"><em>Penguins dataset is available on the Data Professor GitHub<\/em><\/a><em>)<\/em><\/code><\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-1e9ab84 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1e9ab84\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eae09fb\" data-id=\"eae09fb\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a9af479 elementor-widget elementor-widget-heading\" data-id=\"a9af479\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Components of the Penguins Classifier web app<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-f25b6ca elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f25b6ca\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ccfcf9c\" data-id=\"ccfcf9c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-fbe10fd elementor-widget elementor-widget-text-editor\" data-id=\"fbe10fd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThe\u00a0<em>Penguins Classifier web app<\/em>\u00a0is comprised of the\u00a0<strong>Front-end<\/strong>\u00a0and the\u00a0<strong>Back-end<\/strong>:\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ae145e4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ae145e4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1edc735\" data-id=\"1edc735\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-276dd0d elementor-widget elementor-widget-text-editor\" data-id=\"276dd0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>Front-end<\/em><\/strong>\u00a0\u2014 This is what we see upon loading the web app. The front-end can be further broken down into the\u00a0<strong>Side Panel<\/strong>\u00a0and the\u00a0<strong>Main Panel<\/strong>. Screenshot of the web app is shown below.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3f38606 elementor-widget elementor-widget-text-editor\" data-id=\"3f38606\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThe\u00a0<strong>Side Panel<\/strong>\u00a0is found on the left and it is labeled to have the header title of\u00a0<em>\u201cUser Input Features\u201d<\/em>. It is here that the user can either upload a CSV file containing the input features (2 qualitative and 4 quantitative variables). For the 4 quantitative variables, users can manually enter the input values of these input features by adjusting the slider bars. As for the 2 qualitative variables, users can select input values via the drop-down menus.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d8f6add elementor-widget elementor-widget-text-editor\" data-id=\"d8f6add\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThese user input features serve as input to the machine learning model that will be discussed in the back-end. Once a prediction is made, the resulting class label (the Penguins species) along with the Prediction Probability values are sent back to the front-end for display on the\u00a0<strong>Main Panel<\/strong>.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-08a3dc0 elementor-widget elementor-widget-text-editor\" data-id=\"08a3dc0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>Back-end<\/em><\/strong>\u00a0\u2014 The user input features will be converted into a dataframe and sent to the machine learning model for predictions to be made. Herein, we will be using a pre-trained model that was previously saved as a pickle object called\u00a0<code>penguins_clf.pkl<\/code>\u00a0that can be quickly loaded in by the web app (without the need to build a machine learning model each time the web app is loaded by the user).\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-3b88950 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3b88950\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a1e21da\" data-id=\"a1e21da\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-20d30f5 elementor-widget elementor-widget-image\" data-id=\"20d30f5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/miro.medium.com\/v2\/resize:fit:1140\/1*G4-kU4abduBRNHafiDKYig.jpeg\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e6f4f93 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e6f4f93\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ce97293\" data-id=\"ce97293\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1fdc96b elementor-widget elementor-widget-text-editor\" data-id=\"1fdc96b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tFor this tutorial, we will be using 5 Python libraries:\u00a0<code>streamlit<\/code>,\u00a0<code>pandas<\/code>,\u00a0<code>numpy<\/code>,\u00a0<code>scikit-learn<\/code>\u00a0and\u00a0<code>pickle<\/code>. The first 4 will have to be installed if it is not yet already present in your computer while the last library is comes as a built-in library.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-42b2f39 elementor-widget elementor-widget-text-editor\" data-id=\"42b2f39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<p id=\"70af\">To install the libraries, you can easily do this via the<code>pip install<\/code>\u00a0command as follows:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pip install streamlit<\/pre>\n\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eea0762 elementor-widget elementor-widget-text-editor\" data-id=\"eea0762\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><\/p>\nThen, repeat the above commands by first replacing\u00a0<code>streamlit<\/code>\u00a0with the name of other library such as\u00a0<code>pandas<\/code>\u00a0such that it becomes\u00a0<code>pip install pandas<\/code>, and so forth.<p><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b332237 elementor-widget elementor-widget-text-editor\" data-id=\"b332237\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><\/p>\n<p>Or, you can install them all at once with this one-liner:<\/p>\n<p><\/p>\n\n<pre class=\"wp-block-preformatted\">pip install streamlit pandas numpy scikit-learn<\/pre>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2f354c4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2f354c4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3256936\" data-id=\"3256936\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b4130b9 elementor-widget elementor-widget-heading\" data-id=\"b4130b9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Codes of the web app<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-179fd5b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"179fd5b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-10970b3\" data-id=\"10970b3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a827f43 elementor-widget elementor-widget-text-editor\" data-id=\"a827f43\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tNow, let\u2019s look under the hood of the web app. You will see that the web app is made up of 2 files:\u00a0<code>penguins-model-building.py<\/code>\u00a0and\u00a0<code>penguins-app.py<\/code>.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4c95715 elementor-widget elementor-widget-text-editor\" data-id=\"4c95715\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThe first file (<code>penguins-model-building.py<\/code>) is used to build the machine learning model and saved as a pickle file,\u00a0<code>penguins_clf.pkl<\/code>.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2970572 elementor-widget elementor-widget-text-editor\" data-id=\"2970572\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tSubsequently, the second file (<code>penguins-app.py<\/code>) will apply the trained model (<code>penguins_clf.pkl<\/code>) to predict the class label (the Penguin\u2019s species as being Adelie, Chinstrap or Gentoo) by using input parameters from the sidebar panel of the web app\u2019s front-end.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-6b6f4b5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6b6f4b5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9f57073\" data-id=\"9f57073\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f8b953b elementor-widget elementor-widget-heading\" data-id=\"f8b953b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Line-by-line explanation of the code<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e8fc246 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e8fc246\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a025b7d\" data-id=\"a025b7d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-74ffda3 elementor-widget elementor-widget-heading\" data-id=\"74ffda3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">penguins-model-building.<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-7c9e0fe elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"7c9e0fe\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4388e22\" data-id=\"4388e22\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-885d908 elementor-widget elementor-widget-text-editor\" data-id=\"885d908\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Let\u2019s start with the explanation of this first file that will essentially allow us to pre-build a trained machine learning model prior to running the web app. Why are we doing that? It is to save computational resources in the long run as we are initially building the model once and then applying it to make indefinite predictions (or at least until we re-train the model) on user input parameters made on the sidebar panel of the web app.<\/p>\n<div class='gist '><\/div>\n\n<p class=\"has-text-align-center\">penguins-model-building.py<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><em>Line 1<\/em><\/strong><br \/>Import the\u00a0<code>pandas<\/code>\u00a0library with alias of\u00a0<code>pd<\/code><\/li>\n<li><strong><em>Line 2<\/em><\/strong><br \/>Reads the cleaned penguins dataset from CSV file and assigning it to the\u00a0<code>penguins<\/code>\u00a0variable<\/li>\n<li><strong><em>Lines 4\u201319<\/em><\/strong><br \/>Perform ordinal feature encoding on the 3 qualitative variables comprising of the target\u00a0<strong>Y<\/strong>\u00a0variable (<code>species<\/code>) and the 2\u00a0<strong>X<\/strong>\u00a0variables (<code>sex<\/code>\u00a0and\u00a0<code>island<\/code>).<\/li>\n<\/ul>\n\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-1c052f7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"1c052f7\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-105bec1\" data-id=\"105bec1\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1c35968 elementor-widget elementor-widget-image\" data-id=\"1c35968\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/1407\/1*W3d6KSJvDjE5b2miQ7cbFQ.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-62c8085 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"62c8085\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a9227ce\" data-id=\"a9227ce\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-524bb62 elementor-widget elementor-widget-text-editor\" data-id=\"524bb62\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<ul class=\"wp-block-list\">\n<li><strong><em>Lines 21\u201323<\/em><\/strong><br \/>Separates the\u00a0<code>df<\/code>\u00a0dataframe to\u00a0<code>X<\/code>\u00a0and\u00a0<code>Y<\/code>\u00a0matrices.<\/li>\n<li><strong><em>Lines 25\u201328<\/em><\/strong><br \/>Trains a random forest model<\/li>\n<li><strong><em>Lines 30\u201332<\/em><\/strong><br \/>Saves the trained random forest model to a pickled file called\u00a0<code>penguins_clf.pkl<\/code>.<\/li>\n<\/ul>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-682c695 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"682c695\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c1c6320\" data-id=\"c1c6320\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0bc5aa4 elementor-widget elementor-widget-heading\" data-id=\"0bc5aa4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">penguins-app.py<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-e011fe1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e011fe1\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-518f9f0\" data-id=\"518f9f0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-91f6c1c elementor-widget elementor-widget-text-editor\" data-id=\"91f6c1c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<p id=\"6484\">This second file will serve the web app that will allow predictions to be made using the machine learning model loaded from the pickled file. As mentioned above, the web app accepts inout values from 2 sources:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Feature values from the slider bars.<\/li>\n<li>Feature values from the uploaded CSV file.<\/li>\n<\/ol>\n\n\n<div class='gist '><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-dccc615 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dccc615\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-950faf1\" data-id=\"950faf1\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d121915 elementor-widget elementor-widget-text-editor\" data-id=\"d121915\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><br \/><\/p>\n<p class=\"has-text-align-center\">penguins-app.py<\/p>\n<p><\/p>\n<p><\/p>\n<ul class=\"wp-block-list\">\n<li><strong><em>Lines 1\u20135<\/em><\/strong><br \/>Import\u00a0<code>streamlit<\/code>,\u00a0<code>pandas<\/code>\u00a0and\u00a0<code>numpy<\/code>\u00a0libraries with aliases of\u00a0<code>st<\/code>,\u00a0<code>pd<\/code>\u00a0and\u00a0<code>np<\/code>, respectively. Next, import the\u00a0<code>pickle<\/code>\u00a0library and finally imports the\u00a0<code>RandomForestClassifier()<\/code>\u00a0function from\u00a0<code>sklearn.ensemble<\/code>.<\/li>\n<li><strong><em>Lines 7\u201313<\/em><\/strong><br \/>Writes the web app title and intro text.<\/li>\n<\/ul>\n<p><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-0ef98ab elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0ef98ab\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8358a17\" data-id=\"8358a17\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1be6207 elementor-widget elementor-widget-heading\" data-id=\"1be6207\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Sidebar Panel<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-029cf58 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"029cf58\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2b45f41\" data-id=\"2b45f41\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b569652 elementor-widget elementor-widget-text-editor\" data-id=\"b569652\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<ul class=\"wp-block-list\">\n<li><strong><em>Line 15<\/em><\/strong><br \/>Header title of the sidebar panel.<\/li>\n<li><strong><em>Lines 17\u201319<\/em><\/strong><br \/>Link to download an example CSV file.<\/li>\n<li><strong><em>Lines 21\u201341<\/em><\/strong><br \/>Collects feature values and puts it into a dataframe. We are going to use conditional statements if and else for determining whether the user has uploaded a CSV file (if so then read the CSV file and convert that into a dataframe) or enter feature values by sliding the slider bars whose values will also be converted into a dataframe.<\/li>\n<li><strong><em>Lines 43\u201347<\/em><\/strong><br \/>Combines user input features (either from CSV file or from the slider bars) with the entire penguins dataset. The reason for doing this is to ensure that all variables contain the maximal number of possible values. For instance, if the user input contains data for 1 penguin then the ordinal feature encoding will not work. The reason is because the code will detect only 1 possible value for qualitative variables. For ordinal feature encoding to work, each of the qualitative variable will need to have all possible values.<\/li>\n<\/ul>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a3795db elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a3795db\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f90b30d\" data-id=\"f90b30d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2d5eede elementor-widget elementor-widget-heading\" data-id=\"2d5eede\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Situation A<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b23bdb6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b23bdb6\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-eb2aac6\" data-id=\"eb2aac6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d173c48 elementor-widget elementor-widget-text-editor\" data-id=\"d173c48\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn this first scenario, the qualitative variable\u00a0<code>island<\/code>\u00a0has only 1 possible value which is\u00a0<code>Biscoe<\/code>.\n<div class='gist '><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9040dc4 elementor-widget elementor-widget-text-editor\" data-id=\"9040dc4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p id=\"6511\">The above input feature will produce the following ordinal features after encoding.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:frisfruitig\/block-gist-embed {\"url\":\"https:\/\/gist.github.com\/dataprofessor\/4678cc651cb509ee1118adc64bd23027#file-situation-a-after-csv\",\"jsonFiles\":\"[{u0022nameu0022:u0022situation-A-after.csvu0022,u0022checkedu0022:1}]\",\"filesFetched\":1,\"userHasInteracted\":1} \/-->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-848aac4 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"848aac4\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-72eecac\" data-id=\"72eecac\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2864ecc elementor-widget elementor-widget-heading\" data-id=\"2864ecc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h4 class=\"elementor-heading-title elementor-size-default\">Situation B<\/h4>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-ff45648 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ff45648\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9e754c6\" data-id=\"9e754c6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-dc4e9bb elementor-widget elementor-widget-text-editor\" data-id=\"dc4e9bb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The above input features will produce the following ordinal features.<\/p>\n\n<!-- wp:list -->\n<ul>\n<li><strong><em>Lines 49\u201356<\/em><\/strong><br \/>Performs ordinal feature encoding in a similar fashion as explained above in the model building phase (<code>penguins-model-building.py<\/code>).<\/li>\n<li><strong><em>Lines 58\u201365<\/em><\/strong><br \/>Displays the dataframe of the user input features. Conditional statements will allow the code to automatically determine either to display the dataframe of data from the CSV file or from the slider bars.<\/li>\n<li><strong><em>Lines 67\u201368<\/em><\/strong><br \/>Loads the predictive model from the pickled file,\u00a0<code>penguins_clf.pkl<\/code>.<\/li>\n<li><strong><em>Lines 70\u201372<\/em><\/strong><br \/>Applies the loaded model to make predictions on the df variable, which corresponds to input from the CSV file or from the slider bars.<\/li>\n<li><strong><em>Lines 74\u201376<\/em><\/strong><br \/>Predicted class label of the penguins species are displayed here.<\/li>\n<li><strong><em>Lines 78\u201379<\/em><\/strong><br \/>Prediction probability values for each of the 3 penguins species are shown here.<\/li>\n<\/ul>\n<!-- \/wp:list -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a397131 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a397131\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-02c70c0\" data-id=\"02c70c0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0ff1d07 elementor-widget elementor-widget-heading\" data-id=\"0ff1d07\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Running the web app<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-39f7c4b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"39f7c4b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c797500\" data-id=\"c797500\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a6fd956 elementor-widget elementor-widget-text-editor\" data-id=\"a6fd956\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tNow that we have finished coding the web app, let\u2019s launch it by first firing up your command prompt (terminal window) and type the following command:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">streamlit run penguins-app.py<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bf87312 elementor-widget elementor-widget-text-editor\" data-id=\"bf87312\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<p id=\"6b6c\">The following message should then be displayed in the command prompt:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">&gt; streamlit run penguins-app.py\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-0fbde8c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0fbde8c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-368a3b1\" data-id=\"368a3b1\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-67ec546 elementor-widget elementor-widget-text-editor\" data-id=\"67ec546\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">&gt; streamlit run penguins-app.py\n\nYou can now view your Streamlit app in your browser.\n\nLocal URL: http:\/\/www.experfy.com:8501\nNetwork URL: http:\/\/10.0.0.11:8501<\/pre>\n<!-- \/wp:preformatted -->\n\n<!-- wp:paragraph -->\n<p id=\"0366\">A screenshot of the penguins classifier web app is shown below:\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-310f934 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"310f934\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a81589c\" data-id=\"a81589c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1558bd6 elementor-widget elementor-widget-image\" data-id=\"1558bd6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/2209\/1*qbWHAdjV2xYErjl7H7kbsQ.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-9d14b8e elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"9d14b8e\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d356b50\" data-id=\"d356b50\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2ee9ea2 elementor-widget elementor-widget-heading\" data-id=\"2ee9ea2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Deploying and showcasing the web app<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b9ca923 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b9ca923\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9f3759f\" data-id=\"9f3759f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a26e586 elementor-widget elementor-widget-text-editor\" data-id=\"a26e586\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Great job! You have now created a machine learning-powered web app. Let\u2019s deploy the web app to the internet so that you can share it to your friends and family.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>This article will show you how to build a machine learning powered data science web app in Python using the Streamlit library in a little over 100 lines of code. The web app that we will be building today is the Penguins Classifier. <\/p>\n","protected":false},"author":886,"featured_media":10500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[187],"tags":[94,92,818,114,745,641],"ppma_author":[3736],"class_list":["post-10498","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bigdata-cloud","tag-data-science","tag-machine-learning","tag-penguins-classifier","tag-python","tag-streamlit-library","tag-web-app"],"authors":[{"term_id":3736,"user_id":886,"is_guest":0,"slug":"chanin-nantasenamat","display_name":"Chanin Nantasenamat","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/08\/Chanin-Nantasenamat-150x150.jpg","user_url":"http:\/\/www.mahidol.ac.th\/mueng\/","last_name":"Nantasenamat","first_name":"Chanin","job_title":"","description":"Chanin Nantasenamat is Associate Professor and Head, Center of Data Mining and Biomedical Informatics at Mahidol University, Thailand. He is also Founder of Data Professor YouTube Channel and Associate Editor at Frontiers in Pharmacology. Thought Leader on AI and ML Education, he was a Visiting Professor at Uppsala University, Lund University, University of California at Los Angeles as well as the California State University at Fullerton."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10498","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/886"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=10498"}],"version-history":[{"count":9,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10498\/revisions"}],"predecessor-version":[{"id":33594,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10498\/revisions\/33594"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/10500"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=10498"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=10498"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=10498"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=10498"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}