saas + AI product framework

These days web based saas products usually use next.js and react framework, but AI related functions mostly are written in python. For an AI + saas product, how should one architect in this such case? Shall wrap AI related functions as a restful API and call from web app, or is there some more optimal way?

submitted by /u/mycoco1990
[link] [comments]