Text this: Optimizing energy and latency in edge computing through a Boltzmann driven Bayesian framework for adaptive resource scheduling