Flask is an open source web framework popular in machine learning primarily because it is written in Python (a familiar language) but also because it is simple, lightweight, and fast. It is less popular in large scale production environments than other model serving frameworks like TensorFlow Serving since it was not developed specifically for machine learning and lags behind these tools that offer more functionality and helper functions targeting this specific use case.
Gradient natively integrates Flask for deploying models and includes a pre-built Flask image out of the box which is updated regularly. Alternatively, customers can use a customized version of Flask by using their own Docker image hosted on a public or private Docker registry.
When creating a Deployment, you can select the prebuilt image or bring your own custom image. These options are possible via the web UI, the CLI, or defined as a step within an automated pipeline.
When using the CLI, the command would like something like this:
Learn more about the Gradient Flask integration in the docs.