Update train_api.php