Hi Charles,
You can export your model to a python script by clicking on the Model menu within ModelBuilder > Export > To Python Script. Once the script is export and you add your additional code, you can add it back to the toolbox by right-clicking on the toolbox > Add > Script. Next, run the script by double-clicking on it. Once it completes successfully, open up the Results window (Geoprocessing menu > Results). Under Current Session, right-click on the completed script > Share As > Geoprocessing Service.