That example is essentially building (and ostensibly training) an albeit a trivial model in Go. Typically you have more complicated architecture so you're deployment has two parts:
But the very first sentence on that page says: These APIs are particularly well-suited to loading models created in Python and executing them within a Go application
* the weights * and the architecture