This commit is contained in:
Max 2021-01-05 21:31:54 +00:00
parent 4f862686ef
commit b4655373dc

View File

@ -45,8 +45,9 @@ class VirtualProbe:
def predict_soil_temp(self):
feature = self.firebase.get_feature()
predicted_temp = float(self.model.predict([feature])[0][0])
logging.debug(f'Predicted temp: {predicted_temp}')
return predicted_temp
predicted_temp_2dp = float("{:.1f}".format(float(predicted_temp)))
logging.debug(f'Predicted temp: {predicted_temp_2dp}')
return predicted_temp_2dp
if __name__ == "__main__":