> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/bdb-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-page/notebook-operations/turn-your-script-into-a-model.md).

# Turn your Script into a  Model

Saving & loading a Data Science Lab model

{% hint style="success" %}
*Check-out the walk-through on how to save and load a DSL Model.*
{% endhint %}

![Saving and loading a model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fywaf0I4s1rBObOdfe7b4%2FTurn%20your%20Script%20into%20a%20%20Model.gif?alt=media\&token=2528704f-9c6e-4da9-b52c-56835b8b34f4)

Once the Notebook script is executed successfully, the users can save them as a model. The saved model can be loaded into the Notebook.

## Saving a DSL Model

* Navigate to a Notebook.
* Write code using the following sequence:
  * Read DataFrame
  * Define test and train data
  * Create a model
* Execute the script.

&#x20;    &#x20;

![Sample Script for a Data Science Model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FaxBZJjkgIN2GOOPtgo6f%2Fimage.png?alt=media\&token=9b205619-a4ee-43f3-aeca-f005d3d439dd)

* Get a new cell.
* Give a model name to specify the model.
* Execute the cell.
* After the code gets executed, click the ***Save Model*** notebook in a new cell.
* The saved model gets listed under the ***Models*** list.

![Specify a DSL Model by giving a name](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FFTJhZDkH4IC5pORn2Gnt%2Fimage.png?alt=media\&token=4c5bf7f4-6aa3-445e-a1a3-52afd3fc5e55)

## Loading a DSL Model

* Click on a new cell and select the model by using the given checkbox to load it.
* The model gets loaded into a new cell.

![Loading a saved DSL Model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FMZHuwJnbJnnEygWwSSv8%2Fimage.png?alt=media\&token=330e9517-d0eb-4f47-a0ba-c1674ad34a30)
