© 2019 IEEE.In this paper, the use of TV White Spaces (TVWS) by small cognitive radio wireless network operators (SCWNOs) is considered in order to support the growing demands for IoT applications in smart grid and smart cities. In order to support the wide range of services and applications that are being offered by SCWNOS, spectrum leasing could be considered as an alternative solution to achieve improved Quality of Service (QoS). We consider a situation whereby in order to satisfy the QoS requirements, SCWNOs can decide to lease a certain part of the TVWS spectrum that is referred to as high priority TVWS channel (HPC) for a certain period and pay a fee depending on the duration of HPC spectrum usage. We develop an Artificial Neural Networks (ANN) based online algorithm to determine the optimal transmission decision per time slot that would minimise the overall HPC leasing cost of the SCWNOs while satisfying the QoS constraints. The simulations results shows that our proposed ANN based online algorithms outperforms the Lyapunov based online algorithm while its performance is very close to the optimal offline solution with 99% accuracy.