In our Python-based image-prediction application, we go through the following steps (numbered to correspond to the numbered comments in our Python code file):
- First, we import the required Python dependencies as usual, including the DeepImagePredictor class from the third-party sparkdl Spark package, as shown in the following code:
from sparkdl import DeepImagePredictorfrom pyspark.sql import SparkSessionfrom pyspark.ml.image import ImageSchema
- Next, we create a SparkSession that acts as an entry point into the Spark execution environment, as ...