Exporting the trained model