# Train new model or update

* Follow the link <https://colab.research.google.com/drive/199zNcB3FPfnrD6E7OiwmwCcf27jMnY1b?usp=sharing>

{% hint style="success" %}
This Jupiter Notebook will help to create new ONNX model
{% endhint %}

* Drag your  custom\_words.txt file and bin file if you going to update current mode (i.e. /model/bin/en\_word\_model.bin) to the content of the notebook
* Warning: make sure your custom\_words.txt is appropriate and free from offensive or sensitive language.

<div align="center"><figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2F56j7Cf1yXMw7c6ZT9UPJ%2Fimage.png?alt=media&#x26;token=c7184b67-9ec5-42fb-8707-5e3f9db55b25" alt="" width="171"><figcaption></figcaption></figure></div>

<figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FPLjtHpKYSho94PRKTryi%2Fimage.png?alt=media&#x26;token=64b3fb5c-fd4f-47c7-b0ba-6ffccead159d" alt=""><figcaption></figcaption></figure>

* Replace the language code in case you are training another language model

<figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FaaixEZgMe8ULSvvrCAbP%2Fimage.png?alt=media&#x26;token=10990544-7eee-49fb-9d73-a12659633488" alt="" width="375"><figcaption></figcaption></figure>

* Click "Run all"

<figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2Fhhkyg6TKNP5xnvQVJnHF%2Fimage.png?alt=media&#x26;token=a9a4ce4a-54a3-4fe1-9635-f1cb0f502b4d" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FZ5CmHsR4jneKKfcWGuX1%2Fimage.png?alt=media&#x26;token=f454c6a6-0a1f-4d64-9efd-197e592abd2a" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="success" %}
⚠️ Note: The warning “This notebook was not authored by Google” is automatically shown for all non-Google-created notebooks.

✅ This notebook is safe and was authored by Candy Smith (<candy.smith.info@gmail.com>).

It does not access your personal data unless you explicitly allow it. Please review the code as needed.
{% endhint %}

* Run anyway

* After some time, you will be prompted to restart the session<br>

  <figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FgwcE7YSET1QJmZqlKoQ3%2Fimage.png?alt=media&#x26;token=a508c1e6-188d-42d5-9576-eadfd4eb1386" alt="" width="563"><figcaption></figcaption></figure>

* After restart press "Run all" again

* After some time, you will see a new ONNX model file.<br>

  <figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FJd5Nhv9O7Yte3uJL5YGX%2Fimage.png?alt=media&#x26;token=98fa2620-29c1-40e8-ae24-8b1bd1693dd7" alt="" width="363"><figcaption></figcaption></figure>

* Download it by right click<br>

  <figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2F0ah7km4yAhxSB68e67eP%2Fimage.png?alt=media&#x26;token=613c4b8f-fb85-4d95-8a1c-4409c805c679" alt="" width="375"><figcaption></figcaption></figure>

* Replace your old model in the /mode/ folder

* Optionally you can keep the model in separaate file and assign it in the Language confi<br>

  <figure><img src="https://2833866240-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjXBqDJjxO8HgWsUBESnx%2Fuploads%2FjE3wvf9xODNuomQEmODJ%2Fimage.png?alt=media&#x26;token=d2644b89-92da-4fc0-a7f1-c5194204c865" alt=""><figcaption></figcaption></figure>

### ✅ Success! You trained your model
