Flask is a lightweight Python web framework for turning a trained model into a self-contained web deployment. It is useful for testing a model with beta clients before committing to public-cloud deployment. section 10.1
A practical Flask model deployment connects these pieces:
- A standalone Python server module loads the saved Keras model and defines view functions for the application’s pages. section 10.1.1 section 10.1.2
- The home page collects property characteristics such as location, rooms, and parking spaces; a prediction page displays the result. section 10.1.1
- JavaScript packages submitted values, while CSS controls page rendering and a YAML file supplies server parameters such as the model directory. section 10.1.1
Property-price prediction
A user opens localhost:5000, enters property details, and submits them to a Flask route. The view function reads query-string values, converts continuous inputs to floats, builds model tensors, invokes the loaded model, and passes a prediction to the results page. The demonstration hard-codes one bin value, leaving its calculation as an exercise. section 10.1.2
Figure 10.1 Overview of the web deployment
Use the deployment overview to trace how the trained model, Flask module, configuration, web pages, JavaScript, and CSS fit together. section 10.1.1



