So, what I want to do is create an API that takes an image and outputs a class based on machine learning algorithms. Now the machine learning model is written in python and I want to make the web server in Golang. Any ideas on how to use both these technologies together?
You could just make a standalone Python module that classifies images and outputs their class. Then call this from Go as an external command. It doesn't seem like a lot of integration is needed, so I'd go with this simple approach.
(You might also consider just using Python for the api server. Nothing against Go but it sounds like a simple layer so maybe that the language doesn't really matter.)
Vishwa Bhat
Technology Enthusiast
You've got two options.
Based on your complexity use the suitable approach. Usually first approach solves the problem in most of the cases unless you've high scale/concurrency requirments where REST will be an overhead. Additionally, you better introduce a queuing system in either of the above approaches to avoid blocking on webserver.
Cheers!