Can HF spaces host my REST API containing my ML model

I’m not making a monolithic UX app, so Gradio et al aren’t the only module in my app, which is factored into at least 2 parts: a web service containing my ML model, and a UX.

Does HF like or allow us to do this?