Another spin on this is to make it a DAPP(decentralized app) where users pay for invocations. Look at something like iExec.
I was toying a few years ago with iExec to do some bioinformatics algorithms at a low cost on an infrastructure that users could pay for, but that I wouldn't have to pay to host.
The benefit of this is that it doesn't have to just be client side. It can also be backend as well.
if you run it in a web worker, it should run on a separate thread to the website itself so it shouldn't cause the website any issues unless the model eats all the user's RAM.
I was toying a few years ago with iExec to do some bioinformatics algorithms at a low cost on an infrastructure that users could pay for, but that I wouldn't have to pay to host.
The benefit of this is that it doesn't have to just be client side. It can also be backend as well.