Digital Developer Conference: Cloud Security 2021 – Build the skills to secure your cloud and data Register free

Create a web-based intelligent bank loan application for a loan agent


In this code pattern, create a web-based bank loan application that helps a loan agent decide whether to approve or deny a loan.

Do you have questions about this pattern? Ask them in the forum.


In a typical bank loan department, the loan agent receives an application from a customer. The loan then considers several factors to decide whether the loan is approved or rejected. To help ease this decision-making process, this code pattern explains how to build a web-based application using Python Flask that the loan agent can use to make these decisions. This enables the loan agent to analyze the risk involved while trying to approve the loan.

When you have completed this code pattern, you understand how to:

  • Make a Watson Machine Learning REST API call
  • Send and receive messages to a machine learning model deployed using Watson Machine Learning using REST APIs
  • Integrate IBM Cloud Pak for Data Watson Machine Learning services in a web app



  1. The application developer builds a Python-based app and deploys it.
  2. The customer approaches the loan agent for a loan.
  3. The loan agent submits loan details through the web-based application and gets back risk analysis.
  4. The loan agent makes a decision about the loan application based on the risk analysis results.
  5. The result is relayed back to the customer by the loan agent.


Get detailed instructions in the readme file. Those instructions explain how to:

  1. Deploy to Red Hat OpenShift on IBM Cloud.
  2. Deploy to Cloud Foundry on IBM Cloud.
  3. Deploy locally.

This code pattern is part of the Modernizing your bank loan department series.