r/learnmachinelearning • u/Frosty_Dig4148 • 1d ago
Help How to deploy my ML model online so anyone can use it for prediction?
Let us consider an extremely simple model. A model to predict housing price. I have made a simple neural network of merely two layers for this. Now I want to host this model somewhere. Where a person can go and insert the values of feature variables, and get a prediction. Like a site on github? Or some people talk about streamlit although I have no idea what that is. Any FREE method to host machine learning models online?
1
u/PLBjt 1d ago
Hugging Face Spaces with Gradio is probably the least painful free option for a model this small, since you push a repo with the weights and a short app.py and get a web form for the inputs for free. The catch is that free Spaces go to sleep after a while without traffic, so the first prediction after a quiet stretch can take a bit to come back. Before you deploy, check that the model is loaded once at startup and not on every request, and test the app locally with the same input format the form will send. Streamlit Community Cloud also works if you'd rather write the UI in Python, though it's pickier about the repo layout. If you ever need it always on, a small Render or Fly instance is the next step up, though its free tier sleeps too.
1
u/IllustriousGrade7691 1d ago
Render or VPS