not from the top of my head. I think the easiest would be to adapt that tutorial to use a Transformer from TFHub.
That would be an interesting project.
one problem is that from the blog post, the colab is giving 404, I guess it was moved
Can you check the version of tensorflow installed in your system. If you are using the old version, I would recommend to update your tensorflow to updated versions. You can try with Tensorflow > 2.2 version. You can install by the following command:
pip install tensorflow==2.2.1
If you still face the issue, please do the following things:
Check your python version, it should be greater than 3.6
Check with virtual environment
In case still face issue try once with google colab, if it works it means there is some issue with your OS, so in local machine may be you can try your codes once in linux environment.