• Skip to main content
  • Skip to secondary menu
  • Skip to primary sidebar
  • Skip to footer
  • Articles
  • News
  • Events
  • Advertize
  • Jobs
  • Courses
  • Contact
  • (0)
  • LoginRegister
    • Facebook
    • LinkedIn
    • RSS
      Articles
      News
      Events
      Job Posts
    • Twitter
Datafloq

Datafloq

Data and Technology Insights

  • Categories
    • Big Data
    • Blockchain
    • Cloud
    • Internet Of Things
    • Metaverse
    • Robotics
    • Cybersecurity
    • Startups
    • Strategy
    • Technical
  • Big Data
  • Blockchain
  • Cloud
  • Metaverse
  • Internet Of Things
  • Robotics
  • Cybersecurity
  • Startups
  • Strategy
  • Technical

Developing a Web Application for a Machine Learning Model

Piush Vaish / 3 min read.
June 12, 2019
Datafloq AI Score
×

Datafloq AI Score: 83.67

Datafloq enables anyone to contribute articles, but we value high-quality content. This means that we do not accept SEO link building content, spammy articles, clickbait, articles written by bots and especially not misinformation. Therefore, we have developed an AI, built using multiple built open-source and proprietary tools to instantly define whether an article is written by a human or a bot and determine the level of bias, objectivity, whether it is fact-based or not, sentiment and overall quality.

Articles published on Datafloq need to have a minimum AI score of 60% and we provide this graph to give more detailed information on how we rate this article. Please note that this is a work in progress and if you have any suggestions, feel free to contact us.

floq.to/F2vhv

web application

This post describes developing a web application for a machine learning model and deploying it so that it can be accessed by anyone. The web application is available at:

https://arrear-model.herokuapp.com/

The process of deployment consists of transferring all flask application files from a local computer to the web server. Once completed the web application can be visited by anyone through a public URL. The cloud platform used is Heroku because it supports Python web applications built with various programming languages including applications built with Python flask. Heroku makes things easier by handling administrative tasks by itself so one can focus on the programming part. Another good thing is that web applications is hosted for free. As the traffic increases, one may want to sign up for one of the better plans so that the web application performs well in high traffic.

The steps involved are as follows:

Creating a simple model that can be deployed to the web, where users can input variables to get predictions

For this post, the model is a simple linear regression model based on the paper Assessment of Irish Mortgage Arrears at County Level using Machine Learning Techniques and Open Data . The code and the paper are available for download here. The model is a simple linear regression and predicts the mortgage arrears for the year for the country of Ireland.

Building the components needed by Flask microframework to create a web app


Interested in what the future will bring? Download our 2023 Technology Trends eBook for free.

Consent

Flask is a framework which when loaded in Python automatically executes the routine code and one focus on the specific parts of the web application. A detailed tutorial is available here.

Deploying the final web app using the Heroku platform.

  1. Using the git tool to send local files to the online web server or cloud. So, the first thing to do is to download git from https://git-scm.com/downloads and install it.
  2. Sign up for a free account on Heroku: com.
  3. Download and install Heroku Toolbelt from https://toolbelt.heroku.com/.
    Heroku Toolbelt is a package that allows you to interact with the Heroku cloud through the computer command line and it needs git to do that. You already installed git in step 1.
  4. Make a git repository for the app using git init (use Git CMD for windows)
  5. Start interacting with Heroku account by typing : heroku login
    Enter Heroku account credentials when asked about them.
  6. Create a custom Heroku app: heroku create arrear-model
  7. Create the required Heroku files :
  • Create an empty file named Procfile in the current folder. Then enter this line inside the empty file: web: gunicorn app:app . The file shouldn’t have any extension, so make sure the file name is not getting a .txt extension.
  • Create a requirements.txt file to tell Heroku which packages to install for web app by typing:
    • Flask
    • Pandas
    • gunicorn
    • sklearn
  1. Add all local files to the online repository by typing:
    git add .
    Make sure to include the dot after add. The dot means adding the entire directory to the repository.
  2. Commit your files with:
    git commit 'm First commit
  3. Set the remote destination for pushing from git to Heroku

heroku git:remote -a arrear-model

Makes it easier to push local web app to Heroku, using git.

  1. Push application to Heroku:
    git push heroku master
  2. Make sure at least one instance of the app is running with:
    heroku ps:scale web=1

If everything goes as expected, the app is now live. To check out the deployed app either use heroku opencommand or just go to

https://arrear-model.herokuapp.com/

Categories: Technical
Tags: application, developers, machine learning, tools

About Piush Vaish

I am a techie at heart with knowledge of applying technical standards, principles, theories and techniques in recent projects working both independently as well as in team environment.

My passion for technology drives my belief in the I.T. industry's ability and responsibility to help business to create and develop real practical opportunities.Given the wide range of technologies available, I am a generalist using whichever technology or tool is the best fit for a project.

I manage a blog https://adataanalyst.com/

Primary Sidebar

E-mail Newsletter

Sign up to receive email updates daily and to hear what's going on with us!

Publish
AN Article
Submit
a press release
List
AN Event
Create
A Job Post

Related Articles

The Advantages of IT Staff Augmentation Over Traditional Hiring

May 4, 2023 By Mukesh Ram

The State of Digital Asset Management in 2023

May 3, 2023 By pimcoremkt

Test Data Management – Implementation Challenges and Tools Available

May 1, 2023 By yash.mehta262

Related Jobs

  • Software Engineer | South Yorkshire, GB - February 07, 2023
  • Software Engineer with C# .net Investment House | London, GB - February 07, 2023
  • Senior Java Developer | London, GB - February 07, 2023
  • Software Engineer – Growing Digital Media Company | London, GB - February 07, 2023
  • LBG Returners – Senior Data Analyst | Chester Moor, GB - February 07, 2023
More Jobs

Tags

AI Amazon analysis analytics application Artificial Intelligence BI Big Data business China Cloud Companies company crypto customers Data design development digital engineer engineering environment experience future Google+ government Group health information learning machine learning mobile news public research security services share skills social social media software solutions strategy technology

Related Events

  • 6th Middle East Banking AI & Analytics Summit 2023 | Riyadh, Saudi Arabia - May 10, 2023
  • Data Science Salon NYC: AI & Machine Learning in Finance & Technology | The Theater Center - December 7, 2022
  • Big Data LDN 2023 | Olympia London - September 20, 2023
More events

Related Online Courses

  • Oracle Cloud Data Management Foundations Workshop
  • Data Science at Scale
  • Statistics with Python
More courses

Footer


Datafloq is the one-stop source for big data, blockchain and artificial intelligence. We offer information, insights and opportunities to drive innovation with emerging technologies.

  • Facebook
  • LinkedIn
  • RSS
  • Twitter

Recent

  • 5 Reasons Why Modern Data Integration Gives You a Competitive Advantage
  • 5 Most Common Database Structures for Small Businesses
  • 6 Ways to Reduce IT Costs Through Observability
  • How is Big Data Analytics Used in Business? These 5 Use Cases Share Valuable Insights
  • How Realistic Are Self-Driving Cars?

Search

Tags

AI Amazon analysis analytics application Artificial Intelligence BI Big Data business China Cloud Companies company crypto customers Data design development digital engineer engineering environment experience future Google+ government Group health information learning machine learning mobile news public research security services share skills social social media software solutions strategy technology

Copyright © 2023 Datafloq
HTML Sitemap| Privacy| Terms| Cookies

  • Facebook
  • Twitter
  • LinkedIn
  • WhatsApp

In order to optimize the website and to continuously improve Datafloq, we use cookies. For more information click here.

settings

Dear visitor,
Thank you for visiting Datafloq. If you find our content interesting, please subscribe to our weekly newsletter:

Did you know that you can publish job posts for free on Datafloq? You can start immediately and find the best candidates for free! Click here to get started.

Not Now Subscribe

Thanks for visiting Datafloq
If you enjoyed our content on emerging technologies, why not subscribe to our weekly newsletter to receive the latest news straight into your mailbox?

Subscribe

No thanks

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

Marketing cookies

This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

Keeping this cookie enabled helps us to improve our website.

Please enable Strictly Necessary Cookies first so that we can save your preferences!