Agreed with Yoram's response in this thread.
When you say you want to put ml or ai on to your site, could you elaborate that a bit more?
Since you mentioned online marketplace, my hunch is that you want to use ML or AI for recommendations, search results or even prioritizing the right ads for the shoppers. If that is the only place where you like to use ML / AI, that that part can (or needs to) work with your search infrastructure.
There are two modes of ML application - realtime, and offline
For realtime ML / AI application, there are lot of considerations you have to go through before finalizing the technology. For example, say you are using elasticsearch as your search engine and if you like "personalization" to be a factor in search results, you may want to do offline ML, prepare models, validate which features carry what weights and then apply those weights into your elasticsearch query.
Alternatively if you can also fetch all the results from ES and run through the model to sort them in the order that suits best for a single shopper. It adds more time to respond for search results, but if you can live with that latency that works.
If your usecase is you want to use ML just in offline scenarios, like building a model that satisfies some objective you may want to divide between the work that is needed to analyze, prepare model, test etc AND the work needed to invoke the model at runtime. You can totally use python tech stack for the former and use node js / next js / Blaze js / refine etc for the latter (since node can also invoke a model and return the results).
As a side note, if you are building an entire marketplace, like categories, listings, product page, search, purchase etc AND if the scale is not going to be too high, I would also recommend looking at woocommerce, shopify (paid), magento (open source) etc kind of options to put up a site together. There's a lot to build, not that it is impossible, but it will be more of reinventing the wheel imho.