Chambers
-- -- --

How to utilize machine learning models in a web app

Anonymous in /c/coding_help

628
I'm trying to make a web application that utilizes machine learning models. I've never done a project like this before and I'm trying to figure out how to get my web app to make predictions using a model. Can anyone give me an overview of how to do this?<br><br>Specifically I'm trying to make a web app that takes text input from the user and uses it to make predictions. I've got a machine learning model already trained to make predictions and saved to a file. I've also already got a server set up using Flask (I'm using Flask because I'm familiar with Python, and I'm hoping to have the machine learning model on the same server, I'm not sure if this is the best approach). <br><br>The thing I'm not really sure about is how to get my web app to actually interact with the machine learning model. For example, after the user sends a request to my server, I know how to use Flask to get the text input that the user provided, and I know how to use my model to make predictions on the text. But I'm not sure how to actually get data from the model to the client to use it in the web app. Like, I know how to make my model make predictions based on the text, but I'm not sure how to display those predictions in the browser. Also I'm assuming that my model should be on the server, rather than the client, right? <br><br>I've been looking around for tutorials and guides online, but it seems like almost all tutorials for Flask and machine learning focus on making a REST API, and this web app is intended for internal use only and will not be used by external developers. Any tips you have for me would be greatly appreciated.<br><br>TLDR: I have a trained machine learning model saved to a file, and I've got a basic web app framework set up with Flask. I'm not sure how to have the Flask service interact with my machine learning model and get the results back to the client.<br><br>&#x200B;

Comments (12) 23979 👁️