Added inference code to main, in order to test.