Save trainned model

with open('model.bin', 'wb') as f_out:
    pickle.dump(pipeline, f_out)

Loaded the model back

with open('model.bin', 'rb') as f_in:
    pipeline = pickle.load(f_in)

Convert ipynb to python script

## it should work in github code space

jupyter nbconvert --to=script notebook_name.ipynb 

Fast API