Machine learning model bundled with a library vs. an API
The advantages of deploying the model as a package is the code will be part of the monolith application and require no remote calls thus:


No additional operational demands
No external dependencies
Faster
Fewer security issues
Same uptime as the rest of the application


In general, most features stay in a single monolith application until there is are specific reasons to create separate services.